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
 Image resolution resampling

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
HMArnold Posted - Apr 06 2014 : 14:40:27
I have a bunch of very high resolution wildlife images I want to re-size for a webpage, but I've never used ImageEn enough to know how to do it.

If I just LOADJPEG then SAVEJPEG, I get a significant reduction in file size, and the picture retains it's aspect and colors.

RESIZE crops and I can't tell that changing DPIX/DPIY affects the saved image at all.

Which image setting, procedure or demo shows how to downsample images?

Thanks

Hank

HM Arnold
2   L A T E S T    R E P L I E S    (Newest First)
HMArnold Posted - Apr 07 2014 : 04:24:40
Thanks, William

That's exactly what I'm looking for.

HM Arnold
w2m Posted - Apr 06 2014 : 16:04:03
I think you want to resample the image:
ImageEnView1.Proc.Resample(iWidth, -1, rfNone);

or
ImageEnView1.Proc.Resample(iWidth, iHeight, rfNone, True)

This will reduce the dimensions of the image while maintaining the aspect ratio and will reduce the file size as well.

Declaration
procedure Resample(NewWidth, NewHeight: integer; FilterType: TResampleFilter = rfNone; bMaintainAspectRatio : Boolean = False);

Description
This method resizes the current image. The content of the image changes (stretched to new size).

Parameter Description
NewWidth New image width in pixels. If NewWidth is -1 then it is calculated automatically, respecting the proportions.
NewHeight New image height in pixels. If NewHeight is -1 then it is calculated automatically, respecting the proportions.
FilterType Resampling interpolation algorithm.
bMaintainAspectRatio Automatically reduces NewWidth or NewHeight to ensure the original proportions of the image are maintained

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Custom ImageEn Development