bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #57335] PNG writing support appears to be broken


From: Yavor Doganov
Subject: [bug #57335] PNG writing support appears to be broken
Date: Sun, 1 Dec 2019 11:54:30 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36

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

[Prev in Thread] Current Thread [Next in Thread]