Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Yavor Doganov Newsgroups: gnu.gnustep.bug Subject: [bug #57335] PNG writing support appears to be broken Date: Sun, 1 Dec 2019 11:54:30 -0500 (EST) Lines: 59 Approved: bug-gnustep@gnu.org Message-ID: References: <20191201-185428.sv47215.42504@savannah.gnu.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain;charset=UTF-8 X-Trace: usenet.stanford.edu 1575219274 9679 209.51.188.17 (1 Dec 2019 16:54:34 GMT) X-Complaints-To: action@cs.stanford.edu To: Yavor Doganov , bug-gnustep@gnu.org Envelope-to: bug-gnustep@gnu.org X-PHP-Originating-Script: 1001:sendmail.php X-Savane-Server: savannah.gnu.org:443 [209.51.188.79] X-Savane-Project: gnustep X-Savane-Tracker: bugs X-Savane-Item-ID: 57335 User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36 X-Apparently-From: 46.10.101.102 (Savane authenticated user yavor) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.79 X-BeenThere: bug-gnustep@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNUstep programming environment List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <20191201-185428.sv47215.42504@savannah.gnu.org> Xref: csiph.com gnu.gnustep.bug:4358 URL: 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 _______________________________________________________ Reply to this item at: _______________________________________________ Message sent via Savannah https://savannah.gnu.org/