ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ImagenMview resize question

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
pierrotsc Posted - Jul 27 2013 : 13:37:48
I have an imageenmview component in a panel. when i re size the panel, imageenmview re sizes too but the thumbnail does not stay center as it was originally setup. Anyway, the thumbnail could stay center?
If i can ask more, could the thumbnail be also re sized too as the imageenmview get re sized? like that, if i get a bigger imageebnmview, i would also get bigger centered thumbnail.
Thanks.
P
14   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jul 31 2013 : 20:08:59
@Bill

Yes, you're right. If you are using the store type of ietThumb then the images will be lower quality if resized.

In the new beta though, you can use ietFastThumb, which automatically reloads the image from file when needed (without the memory overhead of using ietNormal).



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
pierrotsc Posted - Jul 30 2013 : 17:37:47
I like your pictures..Very soothing...I added the lockupdate to my code. I really does not know what it does. Maybe I should check the help file :)
Thanks.
w2m Posted - Jul 30 2013 : 16:51:53
This proportionally resizes the thumbnail reasonably well, without large side margins. Set StoreType to ietNormal, GridWidth to 1, SideGap to 8, HorzBorder to 0, UpperGap to 0, VerBorder to 4, Width to 169 in Object Inspector. It is assumed it could be improved; however. It is quite fast with a I7 processor and mid-range graphics card on Windows7- speed does not seem to be a problem and with photographic images it is not pixelated.
procedure TForm1.ImageEnMView1Resize(Sender: TObject);
{ Proportionally resize the thumbnail  }
var
  iAspectRatio: Extended;
begin
  ImageEnMView1.LockUpdate;
  try
    ImageEnMView1.ThumbWidth := ImageEnMView1.Width - 28;
    iAspectRatio := 0.77;
    ImageEnMView1.ThumbHeight := Round(iAspectRatio * ImageEnMView1.ThumbWidth);
  finally
    ImageEnMView1.UnLockUpdate;
  end;
end;



65.06 KB

61.36 KB
William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
xequte Posted - Jul 30 2013 : 13:04:09
Hi

No, the new version won't automatically resize the thumbnails to the window.

That could potentially be quite slow while drag resizing the window, so you should delay the resize using either a TTimer or by posting to the window.

Also it will be slightly faster if you put LockUpdate/UnlockUpdate around your code.

There is no reason the view should become pixelated with quality images, so ensure you are not using EnableLoadEXIFThumbnails.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
pierrotsc Posted - Jul 30 2013 : 12:37:19
I really do not. I kind of like the photolike borders. If I had to, I would set my thumbnail width the same or close to the imageenmview width.
For example, you could set your imageenmview width at 120 ad your thumbnail width at 100. That would leave you 10 pixels on each side.
If you always want 10 pixels on each side when you resize, you would just have to modify the code to reflect that.
thumbnail width + 20 = imageenmview width.

Do you see what I mean?
P.
w2m Posted - Jul 30 2013 : 12:25:59
How do you eliminate the huge borders on the left and right sides of the thumbnail? SideGap is set to 0.


516 KB

William Miller
pierrotsc Posted - Jul 30 2013 : 10:15:36
This is assuming that my imageenmview original sise is 269 and the original thumb size is 100.
LayerView.ThumbWidth := RoundEx((LayerView.Width * 100) / 269);
LayerView.ThumbHeight := LayerView.ThumbWidth;
LayerView.HorizBorder :=
RoundEx((LayerView.Width - LayerView.ThumbWidth) / 2);

That centers and fits...
P
w2m Posted - Jul 30 2013 : 09:31:37
Can you post your code?

William Miller
pierrotsc Posted - Jul 30 2013 : 07:27:42
Bill, I found a way to handle that by using the imageenmview.width and the thumbnail width. It works fine but when the thumbnail becomes too big, the image is pixelated. I guess that makes sense.
P
w2m Posted - Jul 30 2013 : 04:05:21
Does the new unreleased version of ImageEnMView stretch the thumbnails to fit the component when the component is re-sized?

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
pierrotsc Posted - Jul 29 2013 : 05:22:08
That is fine Nigel, I can just wait for the full release. I do not like to play with betas :)
Thanks for the update..
xequte Posted - Jul 28 2013 : 19:24:10
In the developing version you can set ThumbnailsCentered to true.

Email me if you want a pre-release.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
pierrotsc Posted - Jul 27 2013 : 17:57:17
Not a single one. Every thumbnail represent a layer. Right now if i stretch my imgeenmview to the right, the gray (Photolike) background stretches but all the thumbnails do not move. They are still at the same location (That was the center of the imageenmview originally).
I have attached a screenshot.
Thanks.

xequte Posted - Jul 27 2013 : 17:35:17
Hi

Do you mean that you are displaying a single thumbnail/image and always want it to remain in the center despite resizing the control?



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com