URL:
  <https://savannah.gnu.org/bugs/?57335>

                 Summary: PNG writing support appears to be broken
                 Project: GNUstep
            Submitted by: yavor
            Submitted on: Sun 01 Dec 2019 06:54:28 PM EET
                Category: Gui/AppKit
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Conversion between the different (supported) image formats is supposed to work
flawlessly, as should be demonstrated with the attached simple program.  I
tried it on several GNUstep app icons in TIFF format and it produces unusable
PNG images.

After some investigation it turned out that this is due to the implicit
conversion in NSBitmapImageRep -_PNGRepresentationWithProperties:, due to this
condition (NSBitmapImageRep+PNG.m:325):

+++
if ([self isPlanar] || !(_format & NSAlphaNonpremultipliedBitmapFormat))
----

If I change it to ([self isPlanar]) only then the resulting PNG images are
fine.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sun 01 Dec 2019 06:54:28 PM EET  Name: foo.m  Size: 853B   By: yavor
Example program for converting an image to PNG
<http://savannah.gnu.org/bugs/download.php?file_id=47959>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57335>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/


Reply via email to