<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18852"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=691480822-18012010><FONT color=#0000ff
size=2 face=Arial>Thanks for sharing.</FONT></SPAN></DIV><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> delphi-bounces@delphi.org.nz
[mailto:delphi-bounces@delphi.org.nz] <B>On Behalf Of </B>Kyley
Harris<BR><B>Sent:</B> Tuesday, 19 January 2010 10:58 a.m.<BR><B>To:</B> NZ
Borland Developers Group - Delphi List<BR><B>Subject:</B> Re: [DUG] Resizing
images<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>begin</DIV>
<DIV> FSourceBMP.Assign(Value);</DIV>
<DIV> if Zoom <> 1 then</DIV>
<DIV> begin</DIV>
<DIV> FBMP.Assign(FSourceBMP);</DIV>
<DIV> FBMP.Width := Trunc(FSourceBMP.Width * Zoom);</DIV>
<DIV> FBMP.Height := Trunc(FSourceBMP.Height * Zoom);</DIV>
<DIV> Stretch(FBMP.Width, FBMP.Height
,sfBox,1,FSourceBMP,FBMP);</DIV>
<DIV> end else</DIV>
<DIV> FBMP.Assign(FSourceBMP);</DIV>
<DIV> FImageAssigned := True;</DIV>
<DIV>end;</DIV>
<DIV><BR></DIV>
<DIV>here is a snippet using a Zoom variable to stretch with Aspect ratio. Its
basically the same as TCanvas.stretch, but faster and far higher quality. There
are a few options (sfBox, Triangle) etc for how it samples the pixels..
different ones get better results for Text, photo.. etc..</DIV><BR>
<DIV class=gmail_quote>On Tue, Jan 19, 2010 at 10:53 AM, Kyley Harris <SPAN
dir=ltr><<A
href="mailto:Kyley@harrissoftware.com">Kyley@harrissoftware.com</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>Sure.. gimme 5 minutes
<DIV>i can email you the source too.. its open<BR><BR>
<DIV class=gmail_quote>
<DIV>
<DIV></DIV>
<DIV class=h5>On Tue, Jan 19, 2010 at 10:31 AM, Conor Boyd <SPAN
dir=ltr><<A href="mailto:Conor.Boyd@trimble.co.nz"
target=_blank>Conor.Boyd@trimble.co.nz</A>></SPAN> wrote:<BR></DIV></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV>
<DIV></DIV>
<DIV class=h5>
<DIV lang=EN-NZ vlink="purple" bgcolor="#ffffff" link="blue">
<DIV dir=ltr align=left><SPAN><FONT color=#0000ff size=2 face=Arial>Can you
post your example? Or another example?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#0000ff size=2
face=Arial>C.</FONT></SPAN></DIV><BR>
<DIV dir=ltr lang=en-us align=left>
<HR>
<FONT size=2 face=Tahoma><B>From:</B> <A
href="mailto:delphi-bounces@delphi.org.nz"
target=_blank>delphi-bounces@delphi.org.nz</A> [mailto:<A
href="mailto:delphi-bounces@delphi.org.nz"
target=_blank>delphi-bounces@delphi.org.nz</A>] <B>On Behalf Of </B>John
Bird<BR><B>Sent:</B> Tuesday, 19 January 2010 9:46 a.m.<BR><B>To:</B> NZ
Borland Developers Group - Delphi List<BR><B>Subject:</B> [DUG] Resizing
images<BR></FONT><BR></DIV>
<DIV>
<DIV></DIV>
<DIV>
<DIV></DIV>
<DIV><FONT color=#000000 size=2 face=Arial>Resizing images for Images,
bitButtons and icons - I guess we all do this.</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT> </DIV>
<DIV><FONT color=#000000 size=2 face=Arial>I have used IrfanView and
Photofiltre for resizing images, and noticed they tend to alter the
edge pixels around an image - I guess it averages the pixel colours on
a sharp edge if resizing smaller. This is a problem with images with a
background surround - these pixels are not the transparent background colour
any more and create a ragged edge noticeable when the image is on a darker
background.</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT> </DIV>
<DIV><FONT color=#000000 size=2 face=Arial>How do others resize images
properly?</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT> </DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT> </DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT> </DIV>
<DIV><FONT color=#000000 size=2 face=Arial>(Example is the Analogue clock
with the image background some are using- over a dark background you may see
there are a fewer light pixels around the edge that shouldn't be
there)</FONT></DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT> </DIV>
<DIV><FONT color=#000000 size=2 face=Arial></FONT> </DIV>
<DIV>John</DIV></DIV></DIV></DIV><BR></DIV></DIV>
<DIV class=im>_______________________________________________<BR>NZ Borland
Developers Group - Delphi mailing list<BR>Post: <A
href="mailto:delphi@delphi.org.nz"
target=_blank>delphi@delphi.org.nz</A><BR>Admin: <A
href="http://delphi.org.nz/mailman/listinfo/delphi"
target=_blank>http://delphi.org.nz/mailman/listinfo/delphi</A><BR>Unsubscribe:
send an email to <A href="mailto:delphi-request@delphi.org.nz"
target=_blank>delphi-request@delphi.org.nz</A> with Subject:
unsubscribe<BR></DIV></BLOCKQUOTE></DIV>
<DIV class=im><BR><BR clear=all><BR>-- <BR>Kyley Harris<BR>Harris
Software<BR>+64-21-671-821<BR></DIV></DIV></BLOCKQUOTE></DIV><BR><BR
clear=all><BR>-- <BR>Kyley Harris<BR>Harris
Software<BR>+64-21-671-821<BR></BODY></HTML>