diff --git a/components/aggpas/lazarus/example/AggPas_LCLDemo1_example/AggPasInLCLDemo1.lpr b/components/aggpas/lazarus/example/AggPas_LCLDemo1_example/AggPasInLCLDemo1.lpr index a5bced53cf..a771bc6695 100644 --- a/components/aggpas/lazarus/example/AggPas_LCLDemo1_example/AggPasInLCLDemo1.lpr +++ b/components/aggpas/lazarus/example/AggPas_LCLDemo1_example/AggPasInLCLDemo1.lpr @@ -13,6 +13,7 @@ uses {$R *.res} begin + Application.Title := ''; Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run; diff --git a/lcl/interfaces/gtk3/gtk3lclintf.inc b/lcl/interfaces/gtk3/gtk3lclintf.inc index 5f0c5d5280..9c5c5a2365 100644 --- a/lcl/interfaces/gtk3/gtk3lclintf.inc +++ b/lcl/interfaces/gtk3/gtk3lclintf.inc @@ -230,8 +230,7 @@ begin GetMem(NewData, ArawImage.DataSize); - //if (Ridx <> 0) or (Gidx <> 1) or (Bidx <> 2) or (AIdx <> 3) then - if desc.Depth=32 then + if (Ridx <> 0) or (Gidx <> 1) or (Bidx <> 2) or (AIdx <> 3) then begin // put components in right order @@ -258,6 +257,8 @@ begin Inc(DstRowPtr, ARowstride); Dec(y); end; + end else begin + System.Move(ArawImage.Data^, NewData^, ArawImage.DataSize); end; end @@ -265,11 +266,13 @@ begin NewData := nil; // this is only a rough implementation, there is no check against bitsperpixel - case Desc.Depth of + case Desc.BitsPerPixel of 1: ImageFormat := CAIRO_FORMAT_A1; 8: ImageFormat := CAIRO_FORMAT_A8; - else - ImageFormat := CAIRO_FORMAT_ARGB32; + 24: ImageFormat := CAIRO_FORMAT_RGB24; + 32: ImageFormat := CAIRO_FORMAT_ARGB32; + else + Exit(False); end; ARowStride := GetBytesPerLine(Desc.Width, Desc.BitsPerPixel, rileDWordBoundary); ABitmap := HBitmap(TGtk3Image.Create(NewData, Desc.Width, Desc.Height, ARowStride, ImageFormat,