Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Missing Check in LMDPNgImage

In Methode TLMDPNGChunkIHDR.PrepareImageData

The line

  ImageHandle := CreateDIBSection(ImageDC, pBitmapInfo(@BitmapInfo)^, DIB_RGB_COLORS, ImageData, 0, 0);

could get a 0-Handle an Null-Pointer on ImageData if the drawing is very big.

I add following line

  if ImageHandle = 0 then
    RaiseLastOSError;

the get a better error message instead of a access violation.

Comments

Sign In or Register to comment.