On 9/29/06, Ivan-Assen Ivanov <ivanassen@gmail.com> wrote:
> On 9/29/06, Hans-Emil Skogh <Hans-Emil.Skogh@tritech.se> wrote:
> > >> To implement any image comparisons, one needs
> > >> pixel-access to the images.
> > ...
> > > But you can always convert that image into a DiB
> > > and then manipulate it from there.
> > ...
> > >> The best way would be if we could create a way to
> > >> get the raw data from the CPicture class. Today
> > >> that's not possible as I see it.
> >
> > I might have been wrong about CPicture. The Bitmap-class used to store
> > all images except icons today has GetPixel()/SetPixel()-methods. Those
> > could be exposed from CPicture and utilized.
> > In conjunction with a way to create a CPicture instance containing a
> > blank image of given dimensions everything needed is in place.
> > (Efficient enough? Don't know. Time will tell...)
>
> Attempts to use SetPixel/GetPixel for general image processing or even
> pulling the raw data out of an image class are usually disastrous in
> terms of performance. You're incurring a hit of millions of [possibly
> virtual] function calls, address calculations and God knows what else
> on top of the real processing you need to do.
Get/SetPixel is not just bad performance wise. It also *only* works if
the imgage is visible!
If the DC/Image isn't visible on the screen (off-screen DC for
example), then Get/SetPixel won't work.
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Fri Sep 29 11:54:20 2006