<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.newlc.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>NewLC - How to copy DataAddress() - Comments</title>
 <link>http://www.newlc.com/en/topic-17576</link>
 <description>Comments for &quot;How to copy DataAddress()&quot;</description>
 <language>en</language>
<item>
 <title>Re: How to copy DataAddress()</title>
 <link>http://www.newlc.com/en/topic-17576#comment-37363</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;If you want to copy the entire bitmap data, I would recommend useing Mem::Copy.&lt;br /&gt;&lt;br /&gt;Also if you only want to take a part of the image, several calls to Mem::Copy, one per scanline, is usually a lot faster then a for loop. (as long as the scanline is longer then about 10 pixels or so)&lt;br /&gt;&lt;br /&gt;This because Mem::Copy internally makes sure to use speed tweaks to copy sequential data as quick as possible.&lt;br /&gt;&lt;br /&gt;The actuall copying of the data is no different from copying any other data really.&lt;br /&gt;&lt;br /&gt;Make sure to call ScanLineLenght() or DataStride() (depening on OS version) to know how many bytes a scanline in the picture is. &lt;br /&gt;Because scanlines are always aligned to addresses divisible by four, a scanline is not always width*pixelsize long, but has 0-3 bytes padding too.&lt;br /&gt;&lt;br /&gt;And the size of the image is scanlinelength * height, and not width*height*pixelsize ...&lt;/div&gt;</description>
 <pubDate>Mon, 12 Feb 2007 13:31:39 +0100</pubDate>
 <dc:creator>alh</dc:creator>
 <guid isPermaLink="false">comment 37363 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: How to copy DataAddress()</title>
 <link>http://www.newlc.com/en/topic-17576#comment-37362</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Hi,&lt;br /&gt;&lt;br /&gt;&amp;nbsp; Remember to lock bitmap&amp;#039;s heap (LockHeap()) before starting to copy the data and unlock it (UnlockHeap()) after the copying is over.&amp;nbsp; This way you assure, that internal bitmap data won&amp;#039;t change while copying (for example due to memory reorganization).&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&amp;nbsp; Damian&lt;/div&gt;</description>
 <pubDate>Fri, 09 Feb 2007 08:45:12 +0100</pubDate>
 <dc:creator>l0rd</dc:creator>
 <guid isPermaLink="false">comment 37362 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: How to copy DataAddress()</title>
 <link>http://www.newlc.com/en/topic-17576#comment-37361</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Hi,&lt;br /&gt;&lt;br /&gt;Probably you are copying the data to another newly created bitmap. First you need a TUInt pointer to that addresses of bitmaps. This pointer may be 8bit or 16 bit or 24bit or 32bit depends on your logic of copying and number of times reading the memory. You increment the pointers and assign the value pointed by it.&lt;br /&gt;&lt;br /&gt;Search this forum.. you will get more information.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Tushar&lt;/div&gt;</description>
 <pubDate>Thu, 08 Feb 2007 15:51:51 +0100</pubDate>
 <dc:creator>tusharbhatta</dc:creator>
 <guid isPermaLink="false">comment 37361 at http://www.newlc.com</guid>
</item>
<item>
 <title>How to copy DataAddress()</title>
 <link>http://www.newlc.com/en/topic-17576</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/en/topic-17576&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/en/topic-17576#comments</comments>
 <category domain="http://www.newlc.com/en/forums/2d-3d-graphics">Bitmaps and Graphics</category>
 <pubDate>Thu, 08 Feb 2007 12:22:36 +0100</pubDate>
 <dc:creator>abolfoooud</dc:creator>
 <guid isPermaLink="false">17096 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
