Testing PNG support lazarus / 39-Graphics ---------------------------------------------------------------------- JuhaManninen · 2013-05-04 10:23 I added a patch from José Mejuto for this issue: 20361: Some PNG images don't work with TImage.   http://bugs.freepascal.org/view.php?id=20361 Now running the manual / visual test from   test/manual/png/ I can see PNG support improved but transparency still has problems. Is it a known issue? At least tbwn0g16 shows wrong. GIF shows many errors. ---------------------------------------------------------------------- Timewarp · 2013-05-04 15:11 If you replace line: Code: [Select]imgTestSuite.Picture.LoadFromFile(TestFile); With this code: Code: [Select]var Img: TFPMemoryImage;     Reader: TFPReaderpng; Img := TFPMemoryImage.create(0, 0); Reader := TFPReaderpng.Create; try  Img.LoadFromFile(TestFile, Reader);  imgTestSuite.Picture.Assign(Img); finally  Img.Free;  Reader.Free; end; -> tbwn0g16 shows ok! This means there is bug in Lazarus. BTW, maybe it would be interresting to compare all images like this.. ---------------------------------------------------------------------- JuhaManninen · 2013-05-04 16:32 Quote from: Timewarp on May 04, 2013, 05:11:49 pm-> tbwn0g16 shows ok! This means there is bug in Lazarus. Where exactly is the bug? ---------------------------------------------------------------------- Timewarp · 2013-05-05 06:57 QuoteWhere exactly is the bug? Not sure, attached patch seems to fix tbwn0g16 But now basn4a16 is not shown correctly, bug in fpc?! Or can anyone explain "2-" here? Code: [Select]inc(P,2-Shift shr 3); ---------------------------------------------------------------------- JuhaManninen · 2013-05-05 07:26 Quote from: Timewarp on May 05, 2013, 08:57:22 amOr can anyone explain "2-" here? Code: [Select]inc(P,2-Shift shr 3); Apparently it is usefull in some situations. If you can make a patch that doesn't break anything, I can apply it. ---------------------------------------------------------------------- Timewarp · 2013-05-05 13:24 Ok, here is second patch.. BOTH pathes need to be applied -> images seem to show okay here (Win32). ---------------------------------------------------------------------- JuhaManninen · 2013-05-05 14:23 Quote from: Timewarp on May 05, 2013, 03:24:32 pmOk, here is second patch.. Ok, it is for FPC's libraries. I cannot apply it. You must open a report for FPC project and attach it there. I hope somebody there looks at it. We can link the related Lazarus issue there. When the patch is applied, it still does not help Lazarus compiled with FPC 2.6.2. One option is to make a temporay solution with IFDEFs until the fix is available in FPC release version. The first patch apparently removed a hack (2-...). You should attach it to one of the reports, too. It may be forgotten here. ---------------------------------------------------------------------- Timewarp · 2013-12-02 09:00 Quote from: JuhaManninen on May 05, 2013, 04:23:57 pmYou must open a report for FPC project and attach it there.Just for record, bug 24382 was created, but no real progress made.