TLazIntfImage.Create() doesn't create data - it is not usable without the SetSize call
Original Reporter info from Mantis: kluug.net @onpok
-
Reporter name: Ondrej Pokorny
Original Reporter info from Mantis: kluug.net @onpok
- Reporter name: Ondrej Pokorny
Description:
TLazIntfImage.Create() doesn't create internal pixel data.
Steps to reproduce:
xImgCache := TLazIntfImage.Create(200, 200, [riqfRGB]);
if xImgCache.PixelData=nil then
Writeln('1: no data'!)
else
Writeln('1: OK'!)
xImgCache.SetSize(300, 300); // this creates the data
if xImgCache.PixelData=nil then
Writeln('2: no data'!)
else
Writeln('2: OK'!)
Additional information:
Patch attached.