<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 class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
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 class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">
<div lang="EN-NZ" link="blue" bgcolor="#ffffff" vlink="purple">
<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>