Board index » delphi » something faster than "GetPixel ()" ??

something faster than "GetPixel ()" ??

Hi there,

is there something faster the the following routine in Delphi 2?

For X := 0 to 384 Do
Begin
     Pixel [X, 1] := GetPixel (Image1.Canvas.Handle, X, Y);
     Pixel [X, 2] := GetPixel (Image1.Canvas.Handle, X, Y+1);
End;

Or is there something like the "Move"-Instruction ?

Thank you for your help.

P. Simon
pmssystems...@cww.de

 

Re:something faster than "GetPixel ()" ??


    PMS System Software wrote in message <34FB5228.C35EB...@cww.de>...
    Hi there,
    is there something faster the the following routine in Delphi 2?

         Pixel [X, 1] := GetPixel (Image1.Canvas.Handle, X, Y);

In Delphi 2 you'll have to use API calls to get your hands on the DIB data.
Using Pixels will be very slow.

Delphi 3 introduced a ScanLine property that makes this very easy -- a very
good reason to upgrade to Delphi 3.  I have several ScanLine examples in
the Graphics & Image Processing section of my Computer Lab.  Most
of the examples have EXEs and source so you can see what you'll
need to do in Delphi 3.

efg

_________________________________________
efg's Computer Lab:  http://infomaster.net/external/efg

Earl F. Glynn                 E-Mail:  EarlGl...@att.net
MedTech Research Corporation, Lenexa, KS  USA

Re:something faster than "GetPixel ()" ??


Hi there,

is there something faster the the following routine in Delphi 2?

For X := 0 to 384 Do
Begin
     Pixel [X, 1] := GetPixel (Image1.Canvas.Handle, X, Y);
     Pixel [X, 2] := GetPixel (Image1.Canvas.Handle, X, Y+1);
End;

Or is there something like the "Move"-Instruction ?

Thank you for your help.

P. Simon
pmssystems...@cww.de

Other Threads