[lazarus] Access violation when accessing pixel data

2005-12-05 Thread Ger Remmers
Hi all, When trying to read the pixel data in an image I get an access violation Procedure SCanImage; type TPixelValue = record case integer of 1 :(ColorValue : TColor); 2 :(ColorArray : array[1..4] of byte); end; var HCount, VCount : integer; PixelValue : TPixelValue; begin

Re: [lazarus] Access violation when accessing pixel data

2005-12-05 Thread Alan Chamberlain
I had a similar problem porting a Delphi 7 app to Lazarus. I solved it by using LazIntfImage as below: var I,J, Xres,YRes: integer; Val: longint; SrcIntfImage:TLazIntfImage; Curcolor :TFPColor; Data: array of real; begin with OpenDialog do begin DefaultExt