[DUG] Resizing images
Kyley Harris
Kyley at harrissoftware.com
Tue Jan 19 12:41:58 NZDT 2010
Talking about images.. Isn't it damn annoying how delphis TBitmap, TGraphic,
TJPEGimage etc do not expose or make available any of the header information
such as DPI. you have to save it to a stream and then rip it all our
yourselves even though they parse the information to extract little bits.
On Tue, Jan 19, 2010 at 12:31 PM, Conor Boyd <Conor.Boyd at trimble.co.nz>wrote:
> What I have just tried is this:
>
> Open your double image in Irfanview.
> Crop it to the left hand image.
> Open the Resize/Resample dialog.
> Choose to resize it in half.
> Choose to "Apply Sharpen after resample".
> Choose to Resample using Lanczos Kernel.
>
> Voila, it looks pretty good to me.
>
> The main point here is probably resampling, not resizing.
>
> C.
>
> -----Original Message-----
> From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz]
> On Behalf Of John Bird
> Sent: Tuesday, 19 January 2010 12:13 p.m.
> To: NZ Borland Developers Group - Delphi List
> Subject: Re: [DUG] Resizing images
>
> Here is an example.....shows the original larger image and the resized
> one.
> You can see the ragged border when the image is on a darker background,
> as the offending pixels are not the same as the transparent colour of
> the rest of the square image out to the edges - they have been altered
> in colour by
> the resizing. Hope I am making sense.
>
> The original image was a png, and it has been resized then converted to
> BMP using Irfanview. As far as I recall I didn't use the Lanczos option,
> just the defaults.
>
> http://sites.google.com/site/jbclnz2/delphistuff/delphimiscissues
>
> John
>
> ----- Original Message -----
> From: "Conor Boyd" <Conor.Boyd at trimble.co.nz>
> To: "NZ Borland Developers Group - Delphi List" <delphi at delphi.org.nz>
> Sent: Tuesday, January 19, 2010 11:31 AM
> Subject: Re: [DUG] Resizing images
>
>
> > What I think you're seeing (without seeing your example) is the
> softness
> > introduced by most resampling algorithms (when used for downsampling).
> >
> > Something like Bicubic Sharper in PS or Lanczos Kernel in Irfanview
> > might help.
> >
> > However, most of these sharpening algorithms probably work better on
> > photographic images than they will on graphics. Maybe a more "dumb"
> > program like Paint would resample a graphic better. Or reducing the
> > color depth of the image before resizing will also help.
> >
> > Post an example, and I'll see what I would do with it.
> >
> > C.
> >
> > -----Original Message-----
> > From: delphi-bounces at delphi.org.nz
> [mailto:delphi-bounces at delphi.org.nz]
> > On Behalf Of John Bird
> > Sent: Tuesday, 19 January 2010 11:15 a.m.
> > To: NZ Borland Developers Group - Delphi List
> > Subject: Re: [DUG] Resizing images
> >
> > More specifically - does the GIMP or any other resizing method allow
> me
> > to specify this?:
> >
> > Where say an image with a a white background (the transparent colour)
> > meets a grey border, and the image is resized (especially if resized
> > smaller), there will be on this edge a new pixel that has part of the
> > grey border and
> > the white background. Most resizing operations will change the pixel
> > to
> > light grey/cream whereas I want to tell it to either use the original
> > grey or the white background only for any pixels on the edge.
> >
> > John
> >
> >> The GiMP is always handy for image manipulation. Generally I draw my
> >> images in a really old version of Corel Draw, then use GiMP for
> >> transparance, shadows and so on.
> >>
> >
> >
> > _______________________________________________
> > NZ Borland Developers Group - Delphi mailing list
> > Post: delphi at delphi.org.nz
> > Admin: http://delphi.org.nz/mailman/listinfo/delphi
> > Unsubscribe: send an email to delphi-request at delphi.org.nz with
> Subject:
> > unsubscribe
> >
> > _______________________________________________
> > NZ Borland Developers Group - Delphi mailing list
> > Post: delphi at delphi.org.nz
> > Admin: http://delphi.org.nz/mailman/listinfo/delphi
> > Unsubscribe: send an email to delphi-request at delphi.org.nz with
> Subject:
> > unsubscribe
>
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject:
> unsubscribe
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject:
> unsubscribe
>
--
Kyley Harris
Harris Software
+64-21-671-821
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20100119/4214166a/attachment.html
More information about the Delphi
mailing list