It is fast enought for a 128 x 128 pixels image (icon in my original case), but what about a 3000 x 2600 image (photo) ?

Emile

PS: I will try to send tomorrow the real code just in case...

Subject: Re: Swap colors of a photo
From: "Maarten de Vries" <[EMAIL PROTECTED]>
Date: Sat, 10 Jun 2006 10:04:49 +0200

Hi, I tested your loop, and it worked fine for me. The image
(a photo) turned nicely blue in about half a second. Then I tried to add a
progressbar, and suddenly it took about 8 seconds. So, are you doing
anything else (like updating a progressbar) inside the loop?

Maarten


On 09/06/06, Emile Schwarz <[EMAIL PROTECTED]> wrote:


for x = 0 to PictWidth // I removed 1 to that value before the loop
for y = 0 to PictHeight // I removed 1 to that value before the loop
   // Get a pixel color
   aColor = SourceSurf.Pixel(x,y)

   // Set a new / changed pixel color
   TargetSurf.Pixel(x,y) cmy(aColor.Cyan,aColor.Cyan,0) // for example
next
next

Canvas1.Backdrop = TargetPict

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to