[DUG] Image manipulation
Conor Boyd
Conor.Boyd at trimble.co.nz
Tue Oct 13 17:33:01 NZDT 2009
Depends what Robert wants, but StretchDraw won't give you anything like
the resampling quality of a decent resampling algorithm such as a
Lanczos Kernel. If you want to see the difference without writing code,
check out the freeware Irfanview image utility (www.irfanview.com) and
try resizing an image using the various resampling algorithms available
in that utility.
One thing that I think a lot of people overlook is that a file format is
just that: a file format. Once one has loaded an image from a file of a
particular format, then the image in memory is simply a bitmapped image
(or a raster image or whatever). At that point, it's completely
divorced from the file format it happened to be last persisted in.
C.
________________________________
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz]
On Behalf Of John Bird
Sent: Tuesday, 13 October 2009 5:13 p.m.
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Image manipulation
I have a neat program that can picks a JPG file, converts JPG to BMP and
back and resize it at will too.
The trick is that you can resize as a BMP, but save back as a JPG
Can email the rest of the project, but here is the main unit to show its
not hard to do...
This program zooms a bevel in and out to show the size of the image will
be when resized, but does not actually resize until you click resize
now, as the image would lose quality by being continuously resized.
Its all done by about 4 lines in the ResizeNow procedure
[snip]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20091013/9453f5d1/attachment-0001.html
More information about the Delphi
mailing list