Skip to content
GitLab
    • Why GitLab
    • Pricing
    • Contact Sales
    • Explore
  • Why GitLab
  • Pricing
  • Contact Sales
  • Explore
  • Sign in
  • Get free trial
  • FPC
  • Lazarus Lazarus
  • LazarusLazarus
  • Issues
  • #35035

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

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.

Mantis conversion info:

  • Mantis ID: 35035
  • Version: 2.1 (SVN)
  • Fixed in version: 2.1 (SVN)
  • Fixed in revision: 60360 (#71e6fd3e), 60361 (#05aa1b08)
  • Target version: 2.2
Assignee
Assign to
Time tracking