<?xml version="1.0" encoding="iso-8859-9" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwizguide.com/rss_namespace/">
 <channel>
  <title>Datakent Forum : Bitmap SmoothResize</title>
  <link>http://forum.datakent.com/</link>
  <description>XML içerik linki; Datakent Forum : Borland Delphi : Bitmap SmoothResize</description>
  <pubDate>Tue, 28 Apr 2026 21:13:10 +0000</pubDate>
  <lastBuildDate>Sat, 31 Oct 2009 10:24:04 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.54</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.datakent.com/RSS_post_feed.asp?TID=1827</WebWizForums:feedURL>
  <image>
   <title>Datakent Forum</title>
   <url>http://forum.datakent.com/forum_images/datakent.com_forums.png</url>
   <link>http://forum.datakent.com/</link>
  </image>
  <item>
   <title>Bitmap SmoothResize : procedure JxSmoothResize(NewWidth,...</title>
   <link>http://forum.datakent.com/forum_posts.asp?TID=1827&amp;PID=3991#3991</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="http://forum.datakent.com/member_profile.asp?PF=1" rel="nofollow">murat turan</a><br /><strong>Konu:</strong> 1827<br /><strong>Gönderim Zamanı:</strong> 31.Ekim.2009 Saat 10:24<br /><br /><P>procedure JxSmoothResize(NewWidth, NewHeight: Cardinal; var Src: TBitmap);<BR>var<BR>&nbsp; x, y, xP, yP, yP2, xP2: integer;<BR>&nbsp; Read, Read2: PByteArray;<BR>&nbsp; t, z, z2, iz2: integer;<BR>&nbsp; pc: PBytearray;<BR>&nbsp; w1, w2, w3, w4: integer;<BR>&nbsp; Col1r, col1g, col1b, Col2r, col2g, col2b: byte;<BR>&nbsp; Dst:TBitmap;<BR>begin<BR>&nbsp; Dst := TBitmap.Create;<BR>&nbsp; Dst.PixelFormat := pf24Bit;<BR>&nbsp; Dst.Width&nbsp; := NewWidth;<BR>&nbsp; Dst.Height := NewHeight;</P><P>&nbsp; xP2 := ((src.Width - 1) shl 15) div Dst.Width;<BR>&nbsp; yP2 := ((src.Height - 1) shl 15) div Dst.Height;<BR>&nbsp; yP := 0;<BR>&nbsp; for y := 0 to Dst.Height - 1 do<BR>&nbsp; begin<BR>&nbsp;&nbsp;&nbsp; xP := 0;<BR>&nbsp;&nbsp;&nbsp; Read := src.ScanLine&#091;yP shr 15&#093;;<BR>&nbsp;&nbsp;&nbsp; if yP shr 16 &lt; src.Height - 1 then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Read2 := src.ScanLine&#091;yP shr 15 + 1&#093;<BR>&nbsp;&nbsp;&nbsp; else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Read2 := src.ScanLine&#091;yP shr 15&#093;;<BR>&nbsp;&nbsp;&nbsp; pc := Dst.scanline&#091;y&#093;;<BR>&nbsp;&nbsp;&nbsp; z2 := yP and $7FFF;<BR>&nbsp;&nbsp;&nbsp; iz2 := $8000 - z2;<BR>&nbsp;&nbsp;&nbsp; for x := 0 to Dst.Width - 1 do<BR>&nbsp;&nbsp;&nbsp; begin<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t := xP shr 15;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Col1r := Read&#091;t * 3&#093;;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Col1g := Read&#091;t * 3 + 1&#093;;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Col1b := Read&#091;t * 3 + 2&#093;;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Col2r := Read2&#091;t * 3&#093;;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Col2g := Read2&#091;t * 3 + 1&#093;;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Col2b := Read2&#091;t * 3 + 2&#093;;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; z := xP and $7FFF;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; w2 := (z * iz2) shr 15;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; w1 := iz2 - w2;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; w4 := (z * z2) shr 15;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; w3 := z2 - w4;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pc&#091;x * 3 + 2&#093; :=<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Col1b * w1 + Read&#091;(t + 1) * 3 + 2&#093; * w2 +<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Col2b * w3 + Read2&#091;(t + 1) * 3 + 2&#093; * w4) shr 15;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pc&#091;x * 3 + 1&#093; :=<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Col1g * w1 + Read&#091;(t + 1) * 3 + 1&#093; * w2 +<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Col2g * w3 + Read2&#091;(t + 1) * 3 + 1&#093; * w4) shr 15;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pc&#091;x * 3&#093; :=<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Col1r * w1 + Read2&#091;(t + 1) * 3&#093; * w2 +<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Col2r * w3 + Read2&#091;(t + 1) * 3&#093; * w4) shr 15;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Inc(xP, xP2);<BR>&nbsp;&nbsp;&nbsp; end;<BR>&nbsp;&nbsp;&nbsp; Inc(yP, yP2);<BR>&nbsp; end;</P><P>&nbsp; try<BR>&nbsp;&nbsp;&nbsp; Src.Assign(Dst);<BR>&nbsp; finally<BR>&nbsp;&nbsp;&nbsp; Dst.Free;<BR>&nbsp; end;<BR>end;</P>]]>
   </description>
   <pubDate>Sat, 31 Oct 2009 10:24:04 +0000</pubDate>
   <guid isPermaLink="true">http://forum.datakent.com/forum_posts.asp?TID=1827&amp;PID=3991#3991</guid>
  </item> 
 </channel>
</rss>