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
 Resample vs LoadFromFile & AutoFit

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
egrobler Posted - Jan 02 2013 : 05:02:29
Hi

I load a large image into TImageEn with the same aspect ration using the AutoFit property.
However, the image quality is poor but if I resample the image first the quality is fine.

Please see attached screenshot, the image to the left is resampled.

My question is: how can I AutoFit an image with good quality?

Regards
Eric




2   L A T E S T    R E P L I E S    (Newest First)
egrobler Posted - Jan 02 2013 : 07:16:23
Hi William,

Thank you very much.
Thanks looks much better :-)

Regards
Eric
w2m Posted - Jan 02 2013 : 06:59:29
The ZoomFilter property specifies the filter to apply in zoom-in (Zoom property) operations. The fastest way to zoom a picture is to set ZoomFilter to rfNone (default). In your case AutoFit is a form of zoom so set the ZoomFilter before loading the image.

If rfHermite givess you the best result as shown in your code then call ImageEn1.ZoomFilter := rfHermite:

procedure TForm14.FormCreate(Sender: TObject);
begin
  ImageEn1.ZoomFilter := rfHermite;
  ImageEn2.ZoomFilter := rfHermite:
  ResampleStreamToStream();
  ImageEn1.IO.LoadFromFileJpeg();
  ImageEn2.IO.LoadFromFileJpeg();
end;


William Miller

Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html