<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Nice !<br>
<br>
I had read that since GraphicsEx loads images as bitmaps you lost some
of the advanced features of the image format. Do you know if png files
retain their transparencies?<br>
<br>
This all looks very promising. I will forward this on to the man doing
the work :)<br>
<br>
Rob<br>
<div class="moz-signature">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="ProgId" content="Word.Document">
<meta name="Generator" content="Microsoft Word 11">
<meta name="Originator" content="Microsoft Word 11">
<link rel="File-List" href="Robert%20Martin_files/filelist.xml">
<title>Robert Martin</title>
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Author>Wild Software Ltd</o:Author>
<o:LastAuthor>Wild Software Ltd</o:LastAuthor>
<o:Revision>6</o:Revision>
<o:TotalTime>55</o:TotalTime>
<o:Created>2009-02-13T02:47:00Z</o:Created>
<o:LastSaved>2009-02-13T03:42:00Z</o:LastSaved>
<o:Pages>1</o:Pages>
<o:Words>13</o:Words>
<o:Characters>77</o:Characters>
<o:Company>Wild Software Ltd</o:Company>
<o:Lines>1</o:Lines>
<o:Paragraphs>1</o:Paragraphs>
<o:CharactersWithSpaces>89</o:CharactersWithSpaces>
<o:Version>11.9999</o:Version>
</o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:Break
WrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        mso-header-margin:35.4pt;
        mso-footer-margin:35.4pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";
        mso-ansi-language:#0400;
        mso-fareast-language:#0400;
        mso-bidi-language:#0400;}
</style>
<![endif]-->
<div class="Section1">
<p class="MsoNormal"><span style="" lang="EN-NZ"><o:p><br>
</o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(255, 153, 0);" lang="EN-NZ"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN-NZ"><o:p> </o:p></span></p>
</div>
</div>
<br>
<br>
Conor Boyd wrote:
<blockquote
cite="mid:F7C0AA5DD1508F4789E10B6CC9BB75DB02CE75F4@nzc-ap-xch-02.ap.trimblecorp.net"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta content="MSHTML 6.00.6000.16890" name="GENERATOR">
<div dir="ltr" align="left"><span class="821502303-13102009"><font
color="#0000ff" face="Arial" size="2">Yeah, those issues are what
drove my choice of Graphics32 (image quality and scaling).</font></span></div>
<div dir="ltr" align="left"><span class="821502303-13102009"></span> </div>
<div dir="ltr" align="left"><span class="821502303-13102009"><font
color="#0000ff" face="Arial" size="2">Here's some code which uses
Graphics32 to resample an image.</font></span></div>
<div dir="ltr" align="left"><span class="821502303-13102009"></span> </div>
<div dir="ltr" align="left"><span class="821502303-13102009"><font
color="#0000ff" face="Arial" size="2">OldBitmap, TempBitmap are of
type Graphics32.TBitmap32</font></span></div>
<div dir="ltr" align="left"><span class="821502303-13102009"><font
color="#0000ff" face="Arial" size="2">NewBitmap is of
type Graphics.TBitmap;</font></span></div>
<div dir="ltr" align="left"><span class="821502303-13102009"></span> </div>
<div dir="ltr" align="left"><span class="821502303-13102009"><font
color="#0000ff" face="Arial" size="2"> OldBitmap.Assign(a regular
Graphics.TBitmap here which you could load using GraphicEx);</font></span></div>
<div dir="ltr" align="left"><span class="821502303-13102009"></span> </div>
<div dir="ltr" align="left"><span class="821502303-13102009"><font
color="#0000ff" face="Arial" size="2"> TempBitmap := TBitmap32.Create;<br>
try<br>
TempBitmap.Width := Trunc(OldBitmap.Width * Scale);<br>
TempBitmap.Height := Trunc(OldBitmap.Height * Scale);</font></span></div>
<div> </div>
<div dir="ltr" align="left"><span class="821502303-13102009"><font
color="#0000ff" face="Arial" size="2"> rs :=
TKernelResampler.Create(OldBitmap);</font></span></div>
<div> </div>
<div dir="ltr" align="left"><span class="821502303-13102009"><font
color="#0000ff" face="Arial" size="2"> if FastResamplingWanted then<br>
rs.Kernel := THermiteKernel.Create<br>
else<br>
rs.Kernel := TLanczosKernel.Create;</font></span></div>
<div> </div>
<div dir="ltr" align="left"><span class="821502303-13102009"><font
color="#0000ff" face="Arial" size="2">
GR32_Resamplers.StretchTransfer(TempBitmap,<br>
Rect(0, 0, TempBitmap.Width,
TempBitmap.Height),<br>
Rect(0, 0, TempBitmap.Width,
TempBitmap.Height),<br>
OldBitmap,<br>
Rect(0, 0, OldBitmap.Width,
OldBitmap.Height),<br>
rs, dmBlend, Nil);</font></span></div>
<div> </div>
<div dir="ltr" align="left"><span class="821502303-13102009"><font
color="#0000ff" face="Arial" size="2"> NewBitmap.Assign(TempBitmap);<br>
finally<br>
TempBitmap.Free;<br>
end;<br>
</font></span></div>
<div dir="ltr" align="left"><span class="821502303-13102009"><font
color="#0000ff" face="Arial" size="2">I've paraphrased this from some
code of mine, but hopefully that's the gist of a high-quality resample
for you using Graphics32.</font></span></div>
<div dir="ltr" align="left"><span class="821502303-13102009"></span> </div>
<div dir="ltr" align="left"><span class="821502303-13102009"><font
color="#0000ff" face="Arial" size="2">Cheers,</font></span></div>
<div dir="ltr" align="left"><span class="821502303-13102009"></span> </div>
<div dir="ltr" align="left"><span class="821502303-13102009"><font
color="#0000ff" face="Arial" size="2">Conor</font></span></div>
<br>
<div class="OutlookMessageHeader" dir="ltr" align="left" lang="en-us">
<hr tabindex="-1"><font face="Tahoma" size="2"><b>From:</b>
<a class="moz-txt-link-abbreviated" href="mailto:delphi-bounces@delphi.org.nz">delphi-bounces@delphi.org.nz</a> [<a class="moz-txt-link-freetext" href="mailto:delphi-bounces@delphi.org.nz">mailto:delphi-bounces@delphi.org.nz</a>] <b>On
Behalf Of </b>Jeremy Coulter<br>
<b>Sent:</b> Tuesday, 13 October 2009 4:09 p.m.<br>
<b>To:</b> NZ Borland Developers Group - Delphi List<br>
<b>Subject:</b> Re: [DUG] Image manipulation<br>
</font><br>
</div>
I have some code that I wrote form bits of other code off the net that
resizes images so they dont loose any quality. But like how Photoshop
does it etc.....well nearly.<br>
I needed one that did scaling so that the aspect ratio was retained. It
seems to work ok.<br>
<br>
Jeremy<br>
<br>
<div class="gmail_quote">On Tue, Oct 13, 2009 at 4:05 PM, Kyley
Harris <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:Kyley@harrissoftware.com">Kyley@harrissoftware.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">GraphicsEx
is great.. but I do everything with BMP and JPG only<br>
<br>
<div class="gmail_quote">
<div class="im">On Tue, Oct 13, 2009 at 3:43 PM, Robert martin <span
dir="ltr"><<a moz-do-not-send="true" href="mailto:rob@chreos.co.nz"
target="_blank">rob@chreos.co.nz</a>></span> wrote:<br>
</div>
<div>
<div class="h5">
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi<br>
<br>
We want to do some basic image manipulation. Specifically the following<br>
<br>
1) open and dipslay Gif, jpg, and png image formats.<br>
2) Resize the above file format<br>
3) Save file back in resized format.<br>
<br>
Does anyone have or recommend any code for doing such?<br>
<br>
I have seen GraphixEx but it states it does not support saving of
images.<br>
<br>
Cheers<br>
Rob<br>
<br>
_______________________________________________<br>
NZ Borland Developers Group - Delphi mailing list<br>
Post: <a moz-do-not-send="true" href="mailto:delphi@delphi.org.nz"
target="_blank">delphi@delphi.org.nz</a><br>
Admin: <a moz-do-not-send="true"
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 moz-do-not-send="true"
href="mailto:delphi-request@delphi.org.nz" target="_blank">delphi-request@delphi.org.nz</a>
with Subject: unsubscribe<br>
</blockquote>
</div>
</div>
</div>
<font color="#888888"><br>
<br clear="all">
<br>
-- <br>
Kyley Harris<br>
Harris Software<br>
+64-21-671-821<br>
</font><br>
_______________________________________________<br>
NZ Borland Developers Group - Delphi mailing list<br>
Post: <a moz-do-not-send="true" href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a><br>
Admin: <a moz-do-not-send="true"
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 moz-do-not-send="true"
href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a>
with Subject: unsubscribe<br>
</blockquote>
</div>
<br>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: <a class="moz-txt-link-abbreviated" href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a>
Admin: <a class="moz-txt-link-freetext" href="http://delphi.org.nz/mailman/listinfo/delphi">http://delphi.org.nz/mailman/listinfo/delphi</a>
Unsubscribe: send an email to <a class="moz-txt-link-abbreviated" href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe</pre>
</blockquote>
</body>
</html>