View Issue Details

IDProjectCategoryView StatusLast Update
0035035LazarusLCLpublic2019-02-08 06:59
ReporterOndrej PokornyAssigned ToMichl 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version2.1 (SVN)Product Build 
Target Version2.2Fixed in Version2.1 (SVN) 
Summary0035035: TLazIntfImage.Create() doesn't create data - it is not usable without the SetSize call
DescriptionTLazIntfImage.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 InformationPatch attached.
TagsNo tags attached.
Fixed in Revision60360, 60361
LazTarget-
Widgetset
Attached Files
  • intfgraphics.pas.patch (356 bytes)
    Index: lcl/intfgraphics.pas
    ===================================================================
    --- lcl/intfgraphics.pas	(revision 60354)
    +++ lcl/intfgraphics.pas	(working copy)
    @@ -3424,6 +3424,7 @@
       then begin
         QueryDescription(FRawImage.Description, AFlags, AWidth, AHeight);
         ChooseGetSetColorFunctions;
    +    CreateData;
       end;
     end;
     
    

Activities

Ondrej Pokorny

2019-02-07 19:00

reporter  

intfgraphics.pas.patch (356 bytes)
Index: lcl/intfgraphics.pas
===================================================================
--- lcl/intfgraphics.pas	(revision 60354)
+++ lcl/intfgraphics.pas	(working copy)
@@ -3424,6 +3424,7 @@
   then begin
     QueryDescription(FRawImage.Description, AFlags, AWidth, AHeight);
     ChooseGetSetColorFunctions;
+    CreateData;
   end;
 end;
 

Michl

2019-02-07 23:04

developer   ~0113935

Applied in trunk revision 60360. I removed the now not anymore needed CreateData calls in LCL in revision 60361.

Thank you!

Ondrej Pokorny

2019-02-08 06:59

reporter   ~0113940

Thank you!

Issue History

Date Modified Username Field Change
2019-02-07 19:00 Ondrej Pokorny New Issue
2019-02-07 19:00 Ondrej Pokorny File Added: intfgraphics.pas.patch
2019-02-07 21:15 Michl Assigned To => Michl
2019-02-07 21:15 Michl Status new => assigned
2019-02-07 23:04 Michl Fixed in Revision => 60360, 60361
2019-02-07 23:04 Michl LazTarget => -
2019-02-07 23:04 Michl Note Added: 0113935
2019-02-07 23:04 Michl Status assigned => resolved
2019-02-07 23:04 Michl Fixed in Version => 2.1 (SVN)
2019-02-07 23:04 Michl Resolution open => fixed
2019-02-07 23:04 Michl Target Version => 2.2
2019-02-08 06:59 Ondrej Pokorny Note Added: 0113940
2019-02-08 06:59 Ondrej Pokorny Status resolved => closed