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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Resample vs LoadFromFile & AutoFit
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

egrobler

42 Posts

Posted - Jan 02 2013 :  05:02:29  Show Profile  Reply
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




w2m

USA
1990 Posts

Posted - Jan 02 2013 :  06:59:29  Show Profile  Reply
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
Go to Top of Page

egrobler

42 Posts

Posted - Jan 02 2013 :  07:16:23  Show Profile  Reply
Hi William,

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

Regards
Eric
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: