From owner-png-list@ccrc.wustl.edu Mon Jan 3 23:03:51 2005 Received: from viruswall2.ccf.swri.edu (viruswall2.ccf.swri.edu [129.162.252.35]) by swrinde.nde.swri.edu (8.12.10/8.12.10) with ESMTP id j0453pC0002244 for ; Mon, 3 Jan 2005 23:03:51 -0600 (CST) Received: from ccf.swri.edu (localhost [127.0.0.1]) by viruswall2.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j0453oaA019957 for ; Mon, 3 Jan 2005 23:03:50 -0600 (CST) Received: from ([129.162.1.33]) by ironmail.ccf.swri.edu with ESMTP id KP-GLL73.4258652; Mon, 03 Jan 2005 23:03:12 -0600 Received: from ccrc.wustl.edu (dns.ccrc.wustl.edu [128.252.169.100]) by mailhub.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j0453BUd014223; Mon, 3 Jan 2005 23:03:12 -0600 (CST) Received: (from majordom@localhost) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) id j0452ae04049; Mon, 3 Jan 2005 23:02:36 -0600 (CST) X-Authentication-Warning: ccrc.wustl.edu: majordom set sender to owner-png-list@ccrc.wustl.edu using -f Received: from wip-ectls-mx1.wipro.com (wip-ectls-mx1.wipro.com [203.101.113.37]) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) with ESMTP id j0452ZQ04045 for ; Mon, 3 Jan 2005 23:02:35 -0600 (CST) Received: from wip-ectls-mx1.wipro.com (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with ESMTP id 2333F220528; Tue, 4 Jan 2005 10:32:34 +0530 (IST) Received: from blr-ec-bh2.wipro.com (blr-ec-bh2.wipro.com [10.200.50.92]) by wip-ectls-mx1.wipro.com (Postfix) with ESMTP id 17EB9220069; Tue, 4 Jan 2005 10:32:34 +0530 (IST) Received: from blr-ec-msg02.wipro.com ([10.200.51.99]) by blr-ec-bh2.wipro.com with Microsoft SMTPSVC(6.0.3790.211); Tue, 4 Jan 2005 10:32:34 +0530 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: [png-list] URGENT:INFO Date: Tue, 4 Jan 2005 10:32:20 +0530 Message-ID: <7EE204A11783534DB33779904613159B0234297B@blr-ec-msg02.wipro.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: URGENT:INFO Thread-Index: AcTyGpGsBbUcV2D1QOCt00f3nXhfvA== X-Priority: 1 Importance: high From: To: Cc: X-OriginalArrivalTime: 04 Jan 2005 05:02:34.0659 (UTC) FILETIME=[9A64DF30:01C4F21A] Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by ccrc.wustl.edu id j0452aQ04046 Sender: owner-png-list@ccrc.wustl.edu Precedence: bulk Reply-To: png-list@ccrc.wustl.edu Hi, I have come across an error in my application while using the png_strip_alpha function. The condition for this function does not get satisfied and the displayed alpha image is incorrect. While opening an RGBA 8 bit image In this function:   png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags) the following condition does not get satisfied if (row_info->color_type == PNG_COLOR_TYPE_RGB && row_info->channels == 4) Since the row_info->color_type is 6 (RGBA) and the value for PNG_COLOR_TYPE_RGB is 2. Same is the case for a GA image wrt the condition .. if (row_info->color_type == PNG_COLOR_TYPE_GRAY && row_info->channels == 2) I need to know why exactly is this condition set like this in the libpng? Does this mean that I have to modify the value of my color type to 2 manually before I read the image. Or is there some setting I am overlooking in my application? Or is this a flaw in the alpha strip function of the libpng? Please reply ASAP. Thanks, Cibby. Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately and destroy all copies of this message and any attachments. -- Send the message body "help" to png-list-request@ccrc.wustl.edu From owner-png-list@ccrc.wustl.edu Tue Jan 4 00:55:46 2005 Received: from viruswall2.ccf.swri.edu (viruswall2.ccf.swri.edu [129.162.252.35]) by swrinde.nde.swri.edu (8.12.10/8.12.10) with ESMTP id j046tjC0004412 for ; Tue, 4 Jan 2005 00:55:45 -0600 (CST) Received: from ccf.swri.edu (localhost [127.0.0.1]) by viruswall2.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j046tjaA027076 for ; Tue, 4 Jan 2005 00:55:45 -0600 (CST) Received: from ([129.162.1.33]) by ironmail.ccf.swri.edu with ESMTP id KP-GLL73.4261810; Tue, 04 Jan 2005 00:55:28 -0600 Received: from ccrc.wustl.edu (dns.ccrc.wustl.edu [128.252.169.100]) by mailhub.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j046tRUd026042; Tue, 4 Jan 2005 00:55:28 -0600 (CST) Received: (from majordom@localhost) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) id j046sv904591; Tue, 4 Jan 2005 00:54:57 -0600 (CST) X-Authentication-Warning: ccrc.wustl.edu: majordom set sender to owner-png-list@ccrc.wustl.edu using -f Received: from janet.rwhmax.com (janet.rwhmax.com [66.227.8.180]) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) with ESMTP id j046suQ04587 for ; Tue, 4 Jan 2005 00:54:57 -0600 (CST) Received: from s01060020af881903.cg.shawcable.net ([68.146.236.159] helo=volans) by janet.rwhmax.com with smtp (Exim 4.43) id 1Cliat-00060W-TM; Tue, 04 Jan 2005 00:55:04 -0600 Message-ID: <007601c4f22a$493ded80$5620a8c0@volans> From: "Willem van Schaik" To: Cc: References: <7EE204A11783534DB33779904613159B0234297B@blr-ec-msg02.wipro.com> Subject: Re: [png-list] URGENT:INFO Date: Mon, 3 Jan 2005 23:54:49 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - janet.rwhmax.com X-AntiAbuse: Original Domain - ccrc.wustl.edu X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - schaik.com X-Source: X-Source-Args: X-Source-Dir: Sender: owner-png-list@ccrc.wustl.edu Precedence: bulk Reply-To: png-list@ccrc.wustl.edu Hi Cibby, > > Please reply ASAP. > So you're in a hurry, I can understand that. You sent your question to two png mailing lists (so I received two copies) and you put the status of your message to "High Priority". Well, let me tell you, for me that's the best recipe for getting irritated and not even reading your question. Good luck, Willem ----- Original Message ----- From: To: Cc: Sent: Monday, January 03, 2005 22:02 Subject: [png-list] URGENT:INFO Hi, I have come across an error in my application while using the png_strip_alpha function. The condition for this function does not get satisfied and the displayed alpha image is incorrect. While opening an RGBA 8 bit image In this function: png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags) the following condition does not get satisfied if (row_info->color_type == PNG_COLOR_TYPE_RGB && row_info->channels == 4) Since the row_info->color_type is 6 (RGBA) and the value for PNG_COLOR_TYPE_RGB is 2. Same is the case for a GA image wrt the condition .. if (row_info->color_type == PNG_COLOR_TYPE_GRAY && row_info->channels == 2) I need to know why exactly is this condition set like this in the libpng? Does this mean that I have to modify the value of my color type to 2 manually before I read the image. Or is there some setting I am overlooking in my application? Or is this a flaw in the alpha strip function of the libpng? Please reply ASAP. Thanks, Cibby. Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately and destroy all copies of this message and any attachments. -- Send the message body "help" to png-list-request@ccrc.wustl.edu -- Send the message body "help" to png-list-request@ccrc.wustl.edu From owner-png-list@ccrc.wustl.edu Tue Jan 4 05:30:32 2005 Received: from viruswall2.ccf.swri.edu (viruswall2.ccf.swri.edu [129.162.252.35]) by swrinde.nde.swri.edu (8.12.10/8.12.10) with ESMTP id j04BUWC0008413 for ; Tue, 4 Jan 2005 05:30:32 -0600 (CST) Received: from ccf.swri.edu (localhost [127.0.0.1]) by viruswall2.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j04BUVaA017684 for ; Tue, 4 Jan 2005 05:30:31 -0600 (CST) Received: from ([129.162.1.33]) by ironmail.ccf.swri.edu with ESMTP id KP-GLL73.4270993; Tue, 04 Jan 2005 05:30:06 -0600 Received: from ccrc.wustl.edu (dns.ccrc.wustl.edu [128.252.169.100]) by mailhub.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j04BU6Ud029547; Tue, 4 Jan 2005 05:30:06 -0600 (CST) Received: (from majordom@localhost) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) id j04BThR05404; Tue, 4 Jan 2005 05:29:43 -0600 (CST) X-Authentication-Warning: ccrc.wustl.edu: majordom set sender to owner-png-list@ccrc.wustl.edu using -f Received: from rwcrmhc13.comcast.net (rwcrmhc13.comcast.net [204.127.198.39]) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) with ESMTP id j04BTgQ05400 for ; Tue, 4 Jan 2005 05:29:42 -0600 (CST) Received: from S0027509848 (pcp037323pcs.aberdn01.md.comcast.net[68.33.89.145]) by comcast.net (rwcrmhc13) with SMTP id <2005010411293001500c5ki9e>; Tue, 4 Jan 2005 11:29:30 +0000 Message-Id: <3.0.6.32.20050104062809.013877e0@mail.comcast.net> X-Sender: glennrp@mail.comcast.net X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32) X-Priority: 1 (Highest) Date: Tue, 04 Jan 2005 06:28:09 -0500 To: png-list@ccrc.wustl.edu From: Glenn Randers-Pehrson Subject: Re: [png-list] URGENT:INFO Cc: In-Reply-To: <7EE204A11783534DB33779904613159B0234297B@blr-ec-msg02.wipr o.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-png-list@ccrc.wustl.edu Precedence: bulk Reply-To: png-list@ccrc.wustl.edu At 10:32 AM 1/4/2005 +0530, cibby.cherian@wipro.com wrote: > >Hi, >I have come across an error in my application while using the png_strip_alpha function. > Are you using the latest libpng version (1.2.8)? There was a bug in versions 1.2.6 and 1.2.7, but I believe it is OK in 1.2.8. Glenn -- Send the message body "help" to png-list-request@ccrc.wustl.edu From owner-png-list@ccrc.wustl.edu Tue Jan 4 07:01:53 2005 Received: from viruswall2.ccf.swri.edu (viruswall2.ccf.swri.edu [129.162.252.35]) by swrinde.nde.swri.edu (8.12.10/8.12.10) with ESMTP id j04D1rC0009167 for ; Tue, 4 Jan 2005 07:01:53 -0600 (CST) Received: from ccf.swri.edu (localhost [127.0.0.1]) by viruswall2.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j04D1qaA023856 for ; Tue, 4 Jan 2005 07:01:52 -0600 (CST) Received: from ([129.162.1.33]) by ironmail.ccf.swri.edu with ESMTP id KP-GLL73.4274052; Tue, 04 Jan 2005 07:01:17 -0600 Received: from ccrc.wustl.edu (dns.ccrc.wustl.edu [128.252.169.100]) by mailhub.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j04D1HUd010657; Tue, 4 Jan 2005 07:01:17 -0600 (CST) Received: (from majordom@localhost) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) id j04D0r105674; Tue, 4 Jan 2005 07:00:53 -0600 (CST) X-Authentication-Warning: ccrc.wustl.edu: majordom set sender to owner-png-list@ccrc.wustl.edu using -f Received: from wip-ectls-mx1.wipro.com (wip-ectls-mx1.wipro.com [203.101.113.37]) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) with ESMTP id j04D0pQ05670 for ; Tue, 4 Jan 2005 07:00:51 -0600 (CST) Received: from wip-ectls-mx1.wipro.com (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with ESMTP id 162B222015D for ; Tue, 4 Jan 2005 18:30:50 +0530 (IST) Received: from blr-ec-bh2.wipro.com (blr-ec-bh2.wipro.com [10.200.50.92]) by wip-ectls-mx1.wipro.com (Postfix) with ESMTP id 0850022010C for ; Tue, 4 Jan 2005 18:30:50 +0530 (IST) Received: from blr-ec-msg02.wipro.com ([10.200.51.99]) by blr-ec-bh2.wipro.com with Microsoft SMTPSVC(6.0.3790.211); Tue, 4 Jan 2005 18:30:49 +0530 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: RE: [png-list] URGENT:INFO Date: Tue, 4 Jan 2005 18:30:36 +0530 Message-ID: <7EE204A11783534DB33779904613159B02342BB3@blr-ec-msg02.wipro.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [png-list] URGENT:INFO Thread-Index: AcTyUmDm3EtRCh+fTMqGXQy1BA6vlAACEI7w From: To: X-OriginalArrivalTime: 04 Jan 2005 13:00:49.0791 (UTC) FILETIME=[6A0688F0:01C4F25D] Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by ccrc.wustl.edu id j04D0qQ05671 Sender: owner-png-list@ccrc.wustl.edu Precedence: bulk Reply-To: png-list@ccrc.wustl.edu Hi, Thanks a lot Glen for the input. I have however managed to resolve the alpha stripping problem in the old version (Version 1.27) on my own... I just adjusted the color channels value in the strip alpha function and changed the entry if loop condition too. This seems to have solved my problem. Now I have 2 issues more to resolve.. 1) Images of different sizes do not open...only certain sizes like 40,36,32,8,4 opens...the rest throws the following error in my application. "An unhandled exception has occurred. ...Invalid parameter used." 2) Also I am unable to display an image that has no background info but has tRNS value in it. The image displayed by the application is incorrect. Any suggestions for the above issues? Regards, Cibby. -----Original Message----- From: owner-png-list@ccrc.wustl.edu [mailto:owner-png-list@ccrc.wustl.edu] On Behalf Of Glenn Randers-Pehrson Sent: Tuesday, January 04, 2005 4:58 PM To: png-list@ccrc.wustl.edu Cc: willem@schaik.com Subject: Re: [png-list] URGENT:INFO Importance: High At 10:32 AM 1/4/2005 +0530, cibby.cherian@wipro.com wrote: > >Hi, >I have come across an error in my application while using the png_strip_alpha function. > Are you using the latest libpng version (1.2.8)? There was a bug in versions 1.2.6 and 1.2.7, but I believe it is OK in 1.2.8. Glenn -- Send the message body "help" to png-list-request@ccrc.wustl.edu Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately and destroy all copies of this message and any attachments. -- Send the message body "help" to png-list-request@ccrc.wustl.edu From owner-png-list@ccrc.wustl.edu Tue Jan 4 07:18:26 2005 Received: from viruswall2.ccf.swri.edu (viruswall2.ccf.swri.edu [129.162.252.35]) by swrinde.nde.swri.edu (8.12.10/8.12.10) with ESMTP id j04DIQC0009565 for ; Tue, 4 Jan 2005 07:18:26 -0600 (CST) Received: from ccf.swri.edu (localhost [127.0.0.1]) by viruswall2.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j04DIQaA025357 for ; Tue, 4 Jan 2005 07:18:26 -0600 (CST) Received: from ([129.162.1.33]) by ironmail.ccf.swri.edu with ESMTP id KP-GLL73.4274816; Tue, 04 Jan 2005 07:17:51 -0600 Received: from ccrc.wustl.edu (dns.ccrc.wustl.edu [128.252.169.100]) by mailhub.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j04DHoUd013234; Tue, 4 Jan 2005 07:17:50 -0600 (CST) Received: (from majordom@localhost) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) id j04DHPk05721; Tue, 4 Jan 2005 07:17:25 -0600 (CST) X-Authentication-Warning: ccrc.wustl.edu: majordom set sender to owner-png-list@ccrc.wustl.edu using -f Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [204.127.202.55]) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) with ESMTP id j04DHOQ05717 for ; Tue, 4 Jan 2005 07:17:25 -0600 (CST) Received: from S0027509848 (pcp037323pcs.aberdn01.md.comcast.net[68.33.89.145]) by comcast.net (sccrmhc11) with SMTP id <2005010413171801100g8p6oe>; Tue, 4 Jan 2005 13:17:18 +0000 Message-Id: <3.0.6.32.20050104081719.0125dbb0@mail.comcast.net> X-Sender: glennrp@mail.comcast.net X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32) Date: Tue, 04 Jan 2005 08:17:19 -0500 To: png-list@ccrc.wustl.edu From: Glenn Randers-Pehrson Subject: RE: [png-list] URGENT:INFO In-Reply-To: <7EE204A11783534DB33779904613159B02342BB3@blr-ec-msg02.wipr o.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-png-list@ccrc.wustl.edu Precedence: bulk Reply-To: png-list@ccrc.wustl.edu At 06:30 PM 1/4/2005 +0530, cibby.cherian@wipro.com wrote: > > >Hi, >Thanks a lot Glen for the input. >I have however managed to resolve the alpha stripping problem in the old >version (Version 1.27) on my own... >I just adjusted the color channels value in the strip alpha function and >changed the entry if loop condition too. This seems to have solved my >problem. > >Now I have 2 issues more to resolve.. > >1) Images of different sizes do not open...only certain sizes like >40,36,32,8,4 opens...the rest throws the following error in my >application. >"An unhandled exception has occurred. >...Invalid parameter used." It might be related to the same bug, which could also cause insufficient memory allocation. Try version 1.2.8. > >2) Also I am unable to display an image that has no background info but >has tRNS value in it. The image displayed by the application is >incorrect. If your input image has alpha it should not have tRNS. Glenn > >Any suggestions for the above issues? > >Regards, >Cibby. > > >-----Original Message----- >From: owner-png-list@ccrc.wustl.edu >[mailto:owner-png-list@ccrc.wustl.edu] On Behalf Of Glenn >Randers-Pehrson >Sent: Tuesday, January 04, 2005 4:58 PM >To: png-list@ccrc.wustl.edu >Cc: willem@schaik.com >Subject: Re: [png-list] URGENT:INFO >Importance: High > >At 10:32 AM 1/4/2005 +0530, cibby.cherian@wipro.com wrote: >> >>Hi, >>I have come across an error in my application while using the >png_strip_alpha function. >> > >Are you using the latest libpng version (1.2.8)? There was a bug in >versions 1.2.6 and 1.2.7, but I believe it is OK in 1.2.8. > >Glenn > > >-- >Send the message body "help" to png-list-request@ccrc.wustl.edu > > > >Confidentiality Notice > >The information contained in this electronic message and any attachments to this message are intended >for the exclusive use of the addressee(s) and may contain confidential or privileged information. If >you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately >and destroy all copies of this message and any attachments. > > >-- >Send the message body "help" to png-list-request@ccrc.wustl.edu > -- Send the message body "help" to png-list-request@ccrc.wustl.edu From owner-png-list@ccrc.wustl.edu Tue Jan 4 15:09:55 2005 Received: from viruswall2.ccf.swri.edu (viruswall2.ccf.swri.edu [129.162.252.35]) by swrinde.nde.swri.edu (8.12.10/8.12.10) with ESMTP id j04L9sf0017339 for ; Tue, 4 Jan 2005 15:09:54 -0600 (CST) Received: from ccf.swri.edu (localhost [127.0.0.1]) by viruswall2.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j04L9raA015051 for ; Tue, 4 Jan 2005 15:09:54 -0600 (CST) Received: from ([129.162.1.33]) by ironmail.ccf.swri.edu with ESMTP id KP-GLL73.4298798; Tue, 04 Jan 2005 15:09:32 -0600 Received: from ccrc.wustl.edu (dns.ccrc.wustl.edu [128.252.169.100]) by mailhub.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j04L9VUd005354; Tue, 4 Jan 2005 15:09:32 -0600 (CST) Received: (from majordom@localhost) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) id j04L7pG07732; Tue, 4 Jan 2005 15:07:51 -0600 (CST) X-Authentication-Warning: ccrc.wustl.edu: majordom set sender to owner-png-list@ccrc.wustl.edu using -f Received: from relay02.roc.ny.frontiernet.net (relay02.roc.ny.frontiernet.net [66.133.131.35]) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) with ESMTP id j04L7oQ07728 for ; Tue, 4 Jan 2005 15:07:50 -0600 (CST) Received: from filter02.roc.ny.frontiernet.net (filter02.roc.ny.frontiernet.net [66.133.131.177]) by relay02.roc.ny.frontiernet.net (Postfix) with ESMTP id 6E3CB102F6 for ; Tue, 4 Jan 2005 21:07:50 +0000 (UTC) Received: from relay02.roc.ny.frontiernet.net ([66.133.131.35]) by filter02.roc.ny.frontiernet.net (filter02.roc.ny.frontiernet.net [66.133.131.177]) (amavisd-new, port 10024) with LMTP id 26873-11-64 for ; Tue, 4 Jan 2005 21:07:50 +0000 (UTC) Received: from cioch.kalmiopsis (67-136-241-233.bras01.myc.or.frontiernet.net [67.136.241.233]) by relay02.roc.ny.frontiernet.net (Postfix) with ESMTP id E0B881036A for ; Tue, 4 Jan 2005 21:07:48 +0000 (UTC) Received: from 192.168.1.16 (ident=unknown) by cioch.kalmiopsis with smtp (masqmail 0.2.18) id 1Clvu7-2fw-00 for ; Tue, 04 Jan 2005 13:07:47 -0800 From: John Bowler To: Subject: RE: [png-list] png_strip_lalpha problems (was: URGENT:INFO) Date: Tue, 4 Jan 2005 13:07:45 -0800 Message-ID: <000d01c4f2a1$70d0e010$1001a8c0@kalmiopsis> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_000E_01C4F25E.62ADA010" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-MS-TNEF-Correlator: 0000000040FF0AD60B5A0B4FA38FD22056AD4647C4B6F201 Importance: Normal In-Reply-To: <7EE204A11783534DB33779904613159B02342BB3@blr-ec-msg02.wipro.com> X-Virus-Scanned: by amavisd-new-20040701 (2.0) at filter02.roc.ny.frontiernet.net Sender: owner-png-list@ccrc.wustl.edu Precedence: bulk Reply-To: png-list@ccrc.wustl.edu This is a multi-part message in MIME format. ------=_NextPart_000_000E_01C4F25E.62ADA010 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit This should probably be on png-implement, but there is a general PNG issue here; how to handle alpha correctly when alpha composition is not possible. This is an issue covered in the specification, see: http://www.libpng.org/pub/png/spec/iso/index-object.html#13Alpha-channel-pro cessing From: cibby.cherian@wipro.com >I just adjusted the color channels value in the strip alpha function and >changed the entry if loop condition too. This seems to have solved my >problem. >Now I have 2 issues more to resolve.. > >1) Images of different sizes do not open...only certain sizes like >40,36,32,8,4 opens...the rest throws the following error in my >application. >"An unhandled exception has occurred. >...Invalid parameter used." You *really* need to use 1.2.8 The changes made in 1.2.6 and 1.2.7 resulted in both the alpha issue (on read) and memory overwrite. You need all the fixes... If you have an already hacked version (1.2.6, 1.2.7) it might be possible to use patch to get incorporate all the fixes, but I would recommend patching your hacks in to 1.2.8 rather than patching the 1.2.8 changes back in because getting 1.2.8 right proved tricky. >2) Also I am unable to display an image that has no background info but >has tRNS value in it. The image displayed by the application is >incorrect. That sounds like a separate problem - is it definately new? png_strip_alpha isn't relevant for this case. If you get correct results for a (non-alpha) image with tRNS and bKGD but *do not* with just tRNS (no bKGD) then I suspect there is something wrong with your program. This is because a call to png_strip_alpha when the image has alpha implies *no* background handling should be done for an image with tRNS (and no alpha). png_strip_alpha just junks the information required for background handling - it can't be correct not to do background handling for alpha images, yet to be sensitive to the bKGD chunk in non-alpha cases! You might want to investigate using 'png_set_background' - it sounds like this might be more appropriate in your case. BTW the common problem I am thinking of is that some application code has handled 'alpha' by simply stripping it and just displaying the remaining channels. That does not work, the values in the RGB channels are not correct for any pixel with 0 ------=_NextPart_000_000E_01C4F25E.62ADA010 Content-Type: application/ms-tnef; name="winmail.dat" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="winmail.dat" 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 Ljs= ------=_NextPart_000_000E_01C4F25E.62ADA010-- -- Send the message body "help" to png-list-request@ccrc.wustl.edu From owner-png-list@ccrc.wustl.edu Wed Jan 5 04:37:40 2005 Received: from viruswall2.ccf.swri.edu (viruswall2.ccf.swri.edu [129.162.252.35]) by swrinde.nde.swri.edu (8.12.10/8.12.10) with ESMTP id j05Abef0029277 for ; Wed, 5 Jan 2005 04:37:40 -0600 (CST) Received: from ccf.swri.edu (localhost [127.0.0.1]) by viruswall2.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j05Abdqh017917 for ; Wed, 5 Jan 2005 04:37:39 -0600 (CST) Received: from ([129.162.1.33]) by ironmail.ccf.swri.edu with ESMTP id KP-GLL73.4325790; Wed, 05 Jan 2005 04:37:01 -0600 Received: from ccrc.wustl.edu (dns.ccrc.wustl.edu [128.252.169.100]) by mailhub.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j05Ab1Ud014011; Wed, 5 Jan 2005 04:37:01 -0600 (CST) Received: (from majordom@localhost) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) id j05AaWu10605; Wed, 5 Jan 2005 04:36:32 -0600 (CST) X-Authentication-Warning: ccrc.wustl.edu: majordom set sender to owner-png-list@ccrc.wustl.edu using -f Received: from wip-ectls-mx1.wipro.com (wip-ectls-mx1.wipro.com [203.101.113.37]) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) with ESMTP id j05AaSQ10600 for ; Wed, 5 Jan 2005 04:36:29 -0600 (CST) Received: from wip-ectls-mx1.wipro.com (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with ESMTP id A38CC2204B1 for ; Wed, 5 Jan 2005 16:06:26 +0530 (IST) Received: from blr-ec-bh3.wipro.com (blr-ec-bh3.wipro.com [10.200.50.93]) by wip-ectls-mx1.wipro.com (Postfix) with ESMTP id 97F132200BD for ; Wed, 5 Jan 2005 16:06:26 +0530 (IST) Received: from blr-ec-msg02.wipro.com ([10.200.51.99]) by blr-ec-bh3.wipro.com with Microsoft SMTPSVC(6.0.3790.211); Wed, 5 Jan 2005 16:06:25 +0530 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: [png-list] URGENT:Info on sizes Date: Wed, 5 Jan 2005 16:06:13 +0530 Message-ID: <7EE204A11783534DB33779904613159B02342DCC@blr-ec-msg02.wipro.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: URGENT:Info on sizes Thread-Index: AcTyUmDm3EtRCh+fTMqGXQy1BA6vlAACEI7wAC2ov3A= From: To: <'png-list@ccrc.wustl.edu'> X-OriginalArrivalTime: 05 Jan 2005 10:36:25.0469 (UTC) FILETIME=[6819AAD0:01C4F312] Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by ccrc.wustl.edu id j05AaVQ10602 Sender: owner-png-list@ccrc.wustl.edu Precedence: bulk Reply-To: png-list@ccrc.wustl.edu Hi, I have downloaded the libpng version 2.8 and I am still facing a problem in the following 2 areas... 1) Palette Images ( with and without interlacing)of different sizes do not open...only certain sizes like 40*40,36*36,32*32,8*8,4*4 opens...the rest throws the following error in my application. "An unhandled exception has occurred. ...Invalid parameter used." I think this issue is not handled by the libpng...or is it??? 2) Also I am unable to display an image that has no background info but has tRNS value in it. The image displayed by the application is incorrect. How every when I set a condition like the one metioned below then it works fine..any idea as to why this is so??? If (( _nColortype == PNG_COLOR_TYPE_PALETTE) && (info_ptr->num_trans ==1) && ( !bkg ) ) { png_set_strip_alpha(png_ptr); } Any suggestions for the above issues? Regards, Cibby. Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately and destroy all copies of this message and any attachments. -- Send the message body "help" to png-list-request@ccrc.wustl.edu From owner-png-list@ccrc.wustl.edu Wed Jan 5 06:37:40 2005 Received: from viruswall2.ccf.swri.edu (viruswall2.ccf.swri.edu [129.162.252.35]) by swrinde.nde.swri.edu (8.12.10/8.12.10) with ESMTP id j05CbZf0000292 for ; Wed, 5 Jan 2005 06:37:35 -0600 (CST) Received: from ccf.swri.edu (localhost [127.0.0.1]) by viruswall2.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j05CbZqh025903 for ; Wed, 5 Jan 2005 06:37:35 -0600 (CST) Received: from ([129.162.1.33]) by ironmail.ccf.swri.edu with ESMTP id KP-GLL73.4329641; Wed, 05 Jan 2005 06:37:00 -0600 Received: from ccrc.wustl.edu (dns.ccrc.wustl.edu [128.252.169.100]) by mailhub.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j05Cb0Ud028167; Wed, 5 Jan 2005 06:37:00 -0600 (CST) Received: (from majordom@localhost) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) id j05Calo10912; Wed, 5 Jan 2005 06:36:47 -0600 (CST) X-Authentication-Warning: ccrc.wustl.edu: majordom set sender to owner-png-list@ccrc.wustl.edu using -f Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.173]) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) with ESMTP id j05CakQ10906 for ; Wed, 5 Jan 2005 06:36:46 -0600 (CST) Received: from [212.227.126.209] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CmAP7-0003Gi-00 for png-list@ccrc.wustl.edu; Wed, 05 Jan 2005 13:36:45 +0100 Received: from [84.135.55.66] (helo=buddha.localdomain.de) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1CmAP7-0007q1-00 for png-list@ccrc.wustl.edu; Wed, 05 Jan 2005 13:36:45 +0100 Date: Wed, 5 Jan 2005 13:36:48 +0100 From: "Matthias B." To: png-list@ccrc.wustl.edu Subject: Re: [png-list] png_strip_lalpha problems (was: URGENT:INFO) Message-ID: <20050105133648.01034c1e@buddha.localdomain.de> In-Reply-To: <000d01c4f2a1$70d0e010$1001a8c0@kalmiopsis> References: <7EE204A11783534DB33779904613159B02342BB3@blr-ec-msg02.wipro.com> <000d01c4f2a1$70d0e010$1001a8c0@kalmiopsis> X-Mailer: Sylpheed-Claws 0.9.13 (GTK+ 1.2.10; i586-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:95d11223a40b7ac6df081cef1fe1fef2 Sender: owner-png-list@ccrc.wustl.edu Precedence: bulk Reply-To: png-list@ccrc.wustl.edu On Tue, 4 Jan 2005 13:07:45 -0800 John Bowler wrote: > issue here; how to handle alpha correctly when alpha composition is not > possible. That sounds like a contradiction in terms. What exactly do you mean? The only way to handle alpha correctly is to do alpha composition. Everything else is not correct by definition. And I don't see under what circumstances alpha composition could be impossible. You can always compose against something, even if it's just all-black or all-white. Of course a more sensible choice is probably to use the background color of the window in which the image is rendered. MSB -- Nietzsche: God is dead! God: Nietzsche is dead! -- Send the message body "help" to png-list-request@ccrc.wustl.edu From owner-png-list@ccrc.wustl.edu Wed Jan 5 11:26:45 2005 Received: from viruswall2.ccf.swri.edu (viruswall2.ccf.swri.edu [129.162.252.35]) by swrinde.nde.swri.edu (8.12.10/8.12.10) with ESMTP id j05HQjf0005098 for ; Wed, 5 Jan 2005 11:26:45 -0600 (CST) Received: from ccf.swri.edu (localhost [127.0.0.1]) by viruswall2.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j05HQiqh026947 for ; Wed, 5 Jan 2005 11:26:44 -0600 (CST) Received: from ([129.162.1.33]) by ironmail.ccf.swri.edu with ESMTP id KP-GLL73.4344016; Wed, 05 Jan 2005 11:26:20 -0600 Received: from ccrc.wustl.edu (dns.ccrc.wustl.edu [128.252.169.100]) by mailhub.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j05HQJUd017105; Wed, 5 Jan 2005 11:26:19 -0600 (CST) Received: (from majordom@localhost) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) id j05HPnd11883; Wed, 5 Jan 2005 11:25:49 -0600 (CST) X-Authentication-Warning: ccrc.wustl.edu: majordom set sender to owner-png-list@ccrc.wustl.edu using -f Received: from relay01.roc.ny.frontiernet.net (relay01.roc.ny.frontiernet.net [66.133.131.34]) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) with ESMTP id j05HPmQ11879 for ; Wed, 5 Jan 2005 11:25:49 -0600 (CST) Received: from filter01.roc.ny.frontiernet.net (filter01.roc.ny.frontiernet.net [66.133.131.176]) by relay01.roc.ny.frontiernet.net (Postfix) with ESMTP id DD26BFF8D for ; Wed, 5 Jan 2005 17:25:48 +0000 (UTC) Received: from relay01.roc.ny.frontiernet.net ([66.133.131.34]) by filter01.roc.ny.frontiernet.net (filter01.roc.ny.frontiernet.net [66.133.131.176]) (amavisd-new, port 10024) with LMTP id 20493-14-24 for ; Wed, 5 Jan 2005 17:25:48 +0000 (UTC) Received: from cioch.kalmiopsis (67-136-241-233.bras01.myc.or.frontiernet.net [67.136.241.233]) by relay01.roc.ny.frontiernet.net (Postfix) with ESMTP id 9C95FFF17 for ; Wed, 5 Jan 2005 17:25:45 +0000 (UTC) Received: from 192.168.1.16 (ident=unknown) by cioch.kalmiopsis with smtp (masqmail 0.2.18) id 1CmEum-3sO-00 for ; Wed, 05 Jan 2005 09:25:44 -0800 From: John Bowler To: Subject: RE: [png-list] png_strip_lalpha problems (was: URGENT:INFO) Date: Wed, 5 Jan 2005 09:25:42 -0800 Message-ID: <000501c4f34b$965a8cf0$1001a8c0@kalmiopsis> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <20050105133648.01034c1e@buddha.localdomain.de> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Importance: Normal X-Virus-Scanned: by amavisd-new-20040701 (2.0) at filter01.roc.ny.frontiernet.net Sender: owner-png-list@ccrc.wustl.edu Precedence: bulk Reply-To: png-list@ccrc.wustl.edu From: Matthias B. >On Tue, 4 Jan 2005 13:07:45 -0800 John Bowler wrote: > >> issue here; how to handle alpha correctly when alpha composition is not >> possible. > >That sounds like a contradiction in terms. Sorry, that was not clear. I intended to say "how to handle alpha correctly when it is not possible to compose the image against the actual displayed background". In that sentence "not possible" is intended to include cases where composition against the actual background is not a realistic possibility - e.g. because the application is not written to make the background accessible to the image handling code or where the code must conform to an API which does not permit access to the background. John Bowler -- Send the message body "help" to png-list-request@ccrc.wustl.edu From owner-png-list@ccrc.wustl.edu Thu Jan 6 07:30:18 2005 Received: from viruswall2.ccf.swri.edu (viruswall2.ccf.swri.edu [129.162.252.35]) by swrinde.nde.swri.edu (8.12.10/8.12.10) with ESMTP id j06DUDf0022130 for ; Thu, 6 Jan 2005 07:30:13 -0600 (CST) Received: from ccf.swri.edu (localhost [127.0.0.1]) by viruswall2.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j06DUCl9008312 for ; Thu, 6 Jan 2005 07:30:12 -0600 (CST) Received: from ([129.162.1.33]) by ironmail.ccf.swri.edu with ESMTP id KP-GLL73.4386156; Thu, 06 Jan 2005 07:29:48 -0600 Received: from ccrc.wustl.edu (dns.ccrc.wustl.edu [128.252.169.100]) by mailhub.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j06DTmUd016294; Thu, 6 Jan 2005 07:29:48 -0600 (CST) Received: (from majordom@localhost) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) id j06DScq15871; Thu, 6 Jan 2005 07:28:38 -0600 (CST) X-Authentication-Warning: ccrc.wustl.edu: majordom set sender to owner-png-list@ccrc.wustl.edu using -f Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.184]) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) with ESMTP id j06DSaQ15867 for ; Thu, 6 Jan 2005 07:28:37 -0600 (CST) Received: from [212.227.126.208] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CmXgq-0008PQ-00 for png-list@ccrc.wustl.edu; Thu, 06 Jan 2005 14:28:36 +0100 Received: from [84.135.60.209] (helo=buddha.localdomain.de) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1CmXgq-0004dt-00 for png-list@ccrc.wustl.edu; Thu, 06 Jan 2005 14:28:36 +0100 Date: Thu, 6 Jan 2005 14:28:38 +0100 From: "Matthias B." To: png-list@ccrc.wustl.edu Subject: Re: [png-list] png_strip_lalpha problems (was: URGENT:INFO) Message-ID: <20050106142838.3a665690@buddha.localdomain.de> In-Reply-To: <000501c4f34b$965a8cf0$1001a8c0@kalmiopsis> References: <20050105133648.01034c1e@buddha.localdomain.de> <000501c4f34b$965a8cf0$1001a8c0@kalmiopsis> X-Mailer: Sylpheed-Claws 0.9.13 (GTK+ 1.2.10; i586-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:95d11223a40b7ac6df081cef1fe1fef2 Sender: owner-png-list@ccrc.wustl.edu Precedence: bulk Reply-To: png-list@ccrc.wustl.edu On Wed, 5 Jan 2005 09:25:42 -0800 John Bowler wrote: > From: Matthias B. > >On Tue, 4 Jan 2005 13:07:45 -0800 John Bowler wrote: > > > >> issue here; how to handle alpha correctly when alpha composition is > >not> possible. > > > >That sounds like a contradiction in terms. > > Sorry, that was not clear. I intended to say "how to handle alpha > correctly when it is not possible to compose the image against the > actual displayed background". This problem should not concern the PNG specs. As long as what the application presents to the user is a possible composition of some background and the image, the result is correct (as far as the PNG specs are concerned). For instance if you compose against pure black, conceptually what you do is change the "actual displayed background" of the area covered by the image to black, and then you display the image against that changed background. The correctness of this operation may be governed by other standards. In the context of HTML for instance it would be incorrect, because the browser can not just invent a black background where there is none. In the context of a standalone PNG-viewer, however, the operation would be perfectly legal, since the app can color its windows any way it likes. MSB -- Why is TV called a medium? Because it's neither rare nor well done. -- Send the message body "help" to png-list-request@ccrc.wustl.edu From owner-png-list@ccrc.wustl.edu Thu Jan 6 15:07:42 2005 Received: from viruswall2.ccf.swri.edu (viruswall2.ccf.swri.edu [129.162.252.35]) by swrinde.nde.swri.edu (8.12.10/8.12.10) with ESMTP id j06L7gf0001285 for ; Thu, 6 Jan 2005 15:07:42 -0600 (CST) Received: from ccf.swri.edu (localhost [127.0.0.1]) by viruswall2.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j06L7fl9000097 for ; Thu, 6 Jan 2005 15:07:42 -0600 (CST) Received: from ([129.162.1.33]) by ironmail.ccf.swri.edu with ESMTP id KP-GLL73.4409844; Thu, 06 Jan 2005 15:07:11 -0600 Received: from ccrc.wustl.edu (dns.ccrc.wustl.edu [128.252.169.100]) by mailhub.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j06L7AUd006285; Thu, 6 Jan 2005 15:07:11 -0600 (CST) Received: (from majordom@localhost) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) id j06L6a317573; Thu, 6 Jan 2005 15:06:36 -0600 (CST) X-Authentication-Warning: ccrc.wustl.edu: majordom set sender to owner-png-list@ccrc.wustl.edu using -f Received: from relay04.roc.ny.frontiernet.net (relay04.roc.ny.frontiernet.net [66.133.131.37]) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) with ESMTP id j06L6ZQ17569 for ; Thu, 6 Jan 2005 15:06:36 -0600 (CST) Received: from filter02.roc.ny.frontiernet.net (filter02.roc.ny.frontiernet.net [66.133.131.177]) by relay04.roc.ny.frontiernet.net (Postfix) with ESMTP id 44165102AC for ; Thu, 6 Jan 2005 21:06:36 +0000 (UTC) Received: from relay04.roc.ny.frontiernet.net ([66.133.131.37]) by filter02.roc.ny.frontiernet.net (filter02.roc.ny.frontiernet.net [66.133.131.177]) (amavisd-new, port 10024) with LMTP id 01178-19-14 for ; Thu, 6 Jan 2005 21:06:36 +0000 (UTC) Received: from cioch.kalmiopsis (67-136-241-233.bras01.myc.or.frontiernet.net [67.136.241.233]) by relay04.roc.ny.frontiernet.net (Postfix) with ESMTP id E6FE9FF52 for ; Thu, 6 Jan 2005 21:06:33 +0000 (UTC) Received: from 192.168.1.16 (ident=unknown) by cioch.kalmiopsis with smtp (masqmail 0.2.18) id 1Cmeq0-5PY-00 for ; Thu, 06 Jan 2005 13:06:32 -0800 From: John Bowler To: Subject: RE: [png-list] png_strip_lalpha problems (was: URGENT:INFO) Date: Thu, 6 Jan 2005 13:06:31 -0800 Message-ID: <000701c4f433$997026f0$1001a8c0@kalmiopsis> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <20050106142838.3a665690@buddha.localdomain.de> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Virus-Scanned: by amavisd-new-20040701 (2.0) at filter02.roc.ny.frontiernet.net Sender: owner-png-list@ccrc.wustl.edu Precedence: bulk Reply-To: png-list@ccrc.wustl.edu From: Matthias B. >This problem should not concern the PNG specs. As long as what the >application presents to the user is a possible composition of some >background and the image, the result is correct (as far as the PNG specs >are concerned). Right, so it does concern the PNG specs! The last three paragraphs of the reference I quoted: http://www.libpng.org/pub/png/spec/iso/index-object.html#13Alpha-channel-pro cessing cover this issue more than adequately. (Ok, dithering an alpha channel is very tricky but I don't think a discussion of this is appropriate for the spec.) The problem I see is that I believe some application programmers are failing to conform to this section of the specification because they simply remove the alpha channel (easy, but wrong) rather than compositing (easy because the code is there in the spec!) My evidence for this is that the memory overwrite bugs introduced in 1.2.6 and 1.2.7 of libpng when png_set_strip_alpha is called did actually result in crash reports for applications which, so far as I can determine, should not have been calling this API. (It seems they should have called png_set_background instead - notice that it's actually easier to use png_set_background than it is to use png_set_strip_alpha because the former covers more cases.) So I raise this on png-list (not png-implement) because if it's not libpng specific. John Bowler -- Send the message body "help" to png-list-request@ccrc.wustl.edu From owner-png-list@ccrc.wustl.edu Fri Jan 7 02:41:08 2005 Received: from viruswall2.ccf.swri.edu (viruswall2.ccf.swri.edu [129.162.252.35]) by swrinde.nde.swri.edu (8.12.10/8.12.10) with ESMTP id j078f8f0019007 for ; Fri, 7 Jan 2005 02:41:08 -0600 (CST) Received: from ccf.swri.edu (localhost [127.0.0.1]) by viruswall2.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j078f7vi024034 for ; Fri, 7 Jan 2005 02:41:07 -0600 (CST) Received: from ([129.162.1.33]) by ironmail.ccf.swri.edu with ESMTP id KP-GLL73.4433726; Fri, 07 Jan 2005 02:40:41 -0600 Received: from ccrc.wustl.edu (dns.ccrc.wustl.edu [128.252.169.100]) by mailhub.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j078eeUd002491; Fri, 7 Jan 2005 02:40:41 -0600 (CST) Received: (from majordom@localhost) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) id j078eAK20037; Fri, 7 Jan 2005 02:40:10 -0600 (CST) X-Authentication-Warning: ccrc.wustl.edu: majordom set sender to owner-png-list@ccrc.wustl.edu using -f Received: from wip-cdctls-mx3.wipro.com (wip-cdctls-mx3.wipro.com [203.101.73.137]) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) with ESMTP id j078dsQ20033 for ; Fri, 7 Jan 2005 02:39:55 -0600 (CST) Received: from wip-cdctls-mx3.wipro.com (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with ESMTP id D4D2429C084; Fri, 7 Jan 2005 14:01:31 +0530 (IST) Received: from blr-ec-bh3.wipro.com (blr-ec-bh3.wipro.com [10.200.50.93]) by wip-cdctls-mx3.wipro.com (Postfix) with ESMTP id 95CD229C051; Fri, 7 Jan 2005 14:01:31 +0530 (IST) Received: from blr-ec-msg02.wipro.com ([10.200.51.99]) by blr-ec-bh3.wipro.com with Microsoft SMTPSVC(6.0.3790.211); Fri, 7 Jan 2005 14:01:17 +0530 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C4F493.2E058FBD" Subject: [png-list] tRNS function Date: Fri, 7 Jan 2005 14:00:45 +0530 Message-ID: <7EE204A11783534DB33779904613159B023433F4@blr-ec-msg02.wipro.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: tRNS function Thread-Index: AcT0ky7RaSn+HrP6SKWp6Ua8navqdQ== From: To: Cc: X-OriginalArrivalTime: 07 Jan 2005 08:31:17.0402 (UTC) FILETIME=[41C50FA0:01C4F493] Sender: owner-png-list@ccrc.wustl.edu Precedence: bulk Reply-To: png-list@ccrc.wustl.edu This is a multi-part message in MIME format. ------_=_NextPart_001_01C4F493.2E058FBD Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, =0D I have a doubt that needs to be clarified.. What is the exact purpose of the function " png_set_tRNS_to_alpha(png_ptr) " . I know it creates an alpha channel if the tRNS value is present which only gets stripped later on in the " png_do_background " function. Doesn't that defeat the whole purpose of creating an alpha channel in the first place using the mentioned function? The code seems to work fine without it but could someone explain its purpose of existence? =0D Please respond! =0D Cibby. =0D =0D =0D Confidentiality Notice=0D The information contained in this electronic message and any attachments to= this message are intended for the exclusive use of the addressee(s) and may contain confidential or= privileged information. If you are not the intended recipient, please notify the sender at Wipro or= Mailadmin@wipro.com immediately and destroy all copies of this message and any attachments. ------_=_NextPart_001_01C4F493.2E058FBD Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

I have a doubt that needs to be= clarified..

What is the exact purpose of the function “= png_set_tRNS_to_alpha(png_ptr) “  . I know it creates an alpha channel if the tRNS value is= present which only gets stripped later on in the “ png_do_background ”  function. Doesn’t that defeat the whole purpose= of creating an alpha channel in the first place using the mentioned function?=  The code seems to work fine without it but could= someone explain its purpose of existence?

 

Please respond!

 

Cibby.

 

 

 



Confidentiality Notice

The information contained in this electronic message and any attachments to= this message are intended
for the exclusive use of the addressee(s) and may contain confidential or= privileged information. If
you are not the intended recipient, please notify the sender at Wipro or= Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.
------_=_NextPart_001_01C4F493.2E058FBD-- -- Send the message body "help" to png-list-request@ccrc.wustl.edu From owner-png-list@ccrc.wustl.edu Fri Jan 7 12:12:08 2005 Received: from viruswall2.ccf.swri.edu (viruswall2.ccf.swri.edu [129.162.252.35]) by swrinde.nde.swri.edu (8.12.10/8.12.10) with ESMTP id j07IC4f0015869 for ; Fri, 7 Jan 2005 12:12:04 -0600 (CST) Received: from ccf.swri.edu (localhost [127.0.0.1]) by viruswall2.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j07IC3vi010849 for ; Fri, 7 Jan 2005 12:12:03 -0600 (CST) Received: from ([129.162.1.33]) by ironmail.ccf.swri.edu with ESMTP id KP-GLL73.4453436; Fri, 07 Jan 2005 12:11:39 -0600 Received: from ccrc.wustl.edu (dns.ccrc.wustl.edu [128.252.169.100]) by mailhub.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j07IBcUd013165; Fri, 7 Jan 2005 12:11:38 -0600 (CST) Received: (from majordom@localhost) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) id j07IAir21733; Fri, 7 Jan 2005 12:10:44 -0600 (CST) X-Authentication-Warning: ccrc.wustl.edu: majordom set sender to owner-png-list@ccrc.wustl.edu using -f Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.183]) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) with ESMTP id j07IAhQ21729 for ; Fri, 7 Jan 2005 12:10:43 -0600 (CST) Received: from [212.227.126.160] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CmyZP-0005nt-00 for png-list@ccrc.wustl.edu; Fri, 07 Jan 2005 19:10:43 +0100 Received: from [217.233.110.189] (helo=buddha.localdomain.de) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1CmyZO-0005CB-00 for png-list@ccrc.wustl.edu; Fri, 07 Jan 2005 19:10:42 +0100 Date: Fri, 7 Jan 2005 19:10:46 +0100 From: "Matthias B." To: png-list@ccrc.wustl.edu Subject: Re: [png-list] png_strip_lalpha problems (was: URGENT:INFO) Message-ID: <20050107191046.161ea7ab@buddha.localdomain.de> In-Reply-To: <000701c4f433$997026f0$1001a8c0@kalmiopsis> References: <20050106142838.3a665690@buddha.localdomain.de> <000701c4f433$997026f0$1001a8c0@kalmiopsis> X-Mailer: Sylpheed-Claws 0.9.13 (GTK+ 1.2.10; i586-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:95d11223a40b7ac6df081cef1fe1fef2 Sender: owner-png-list@ccrc.wustl.edu Precedence: bulk Reply-To: png-list@ccrc.wustl.edu On Thu, 6 Jan 2005 13:06:31 -0800 John Bowler wrote: > From: Matthias B. > >This problem should not concern the PNG specs. As long as what the > >application presents to the user is a possible composition of some > >background and the image, the result is correct (as far as the PNG > >specs are concerned). > > Right, so it does concern the PNG specs! The last three paragraphs of > the reference I quoted: > > http://www.libpng.org/pub/png/spec/iso/index-object.html#13Alpha-channel-pro > cessing > > cover this issue more than adequately. Exactly. So what issue is there for png-list to discuss. Complaining about programmers who don't follow the specs doesn't help anyone and I don't see how we could improve the specs. If anything can be done about it, it has to be done in libpng and libpng's documentation. Besides, if I'm not mistaken, dropping the alpha channel does yield a possible composition result, namely the result of setting the background to a copy of the image without alpha (i.e. fully opaque) and then compositing the image with proper alpha handling against this background. Sure, it's not very useful, but it's technically correct as far as the specs are concerned, because the specs don't and can't specify the background to composite against. MSB -- If voting could change the system, it would be illegal. If not voting could change the system, it would be illegal. -- Send the message body "help" to png-list-request@ccrc.wustl.edu From owner-png-list@ccrc.wustl.edu Fri Jan 7 12:35:32 2005 Received: from viruswall2.ccf.swri.edu (viruswall2.ccf.swri.edu [129.162.252.35]) by swrinde.nde.swri.edu (8.12.10/8.12.10) with ESMTP id j07IZVf0018327 for ; Fri, 7 Jan 2005 12:35:31 -0600 (CST) Received: from ccf.swri.edu (localhost [127.0.0.1]) by viruswall2.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j07IZVvi013251 for ; Fri, 7 Jan 2005 12:35:31 -0600 (CST) Received: from ([129.162.1.33]) by ironmail.ccf.swri.edu with ESMTP id KP-GLL73.4454420; Fri, 07 Jan 2005 12:35:10 -0600 Received: from ccrc.wustl.edu (dns.ccrc.wustl.edu [128.252.169.100]) by mailhub.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j07IZ9Ud016628; Fri, 7 Jan 2005 12:35:10 -0600 (CST) Received: (from majordom@localhost) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) id j07IYch21846; Fri, 7 Jan 2005 12:34:38 -0600 (CST) X-Authentication-Warning: ccrc.wustl.edu: majordom set sender to owner-png-list@ccrc.wustl.edu using -f Received: from relay01.roc.ny.frontiernet.net (relay01.roc.ny.frontiernet.net [66.133.131.34]) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) with ESMTP id j07IYbQ21842 for ; Fri, 7 Jan 2005 12:34:37 -0600 (CST) Received: from filter01.roc.ny.frontiernet.net (filter01.roc.ny.frontiernet.net [66.133.131.176]) by relay01.roc.ny.frontiernet.net (Postfix) with ESMTP id E4521FF15 for ; Fri, 7 Jan 2005 18:34:37 +0000 (UTC) Received: from relay01.roc.ny.frontiernet.net ([66.133.131.34]) by filter01.roc.ny.frontiernet.net (filter01.roc.ny.frontiernet.net [66.133.131.176]) (amavisd-new, port 10024) with LMTP id 03481-07-5 for ; Fri, 7 Jan 2005 18:34:37 +0000 (UTC) Received: from cioch.kalmiopsis (67-136-241-233.bras01.myc.or.frontiernet.net [67.136.241.233]) by relay01.roc.ny.frontiernet.net (Postfix) with ESMTP id A6288101F6 for ; Fri, 7 Jan 2005 18:34:35 +0000 (UTC) Received: from 192.168.1.16 (ident=unknown) by cioch.kalmiopsis with smtp (masqmail 0.2.18) id 1CmywU-6er-00 for ; Fri, 07 Jan 2005 10:34:34 -0800 From: John Bowler To: Subject: RE: [png-list] png_strip_lalpha problems (was: URGENT:INFO) Date: Fri, 7 Jan 2005 10:34:32 -0800 Message-ID: <000301c4f4e7$88f07820$1001a8c0@kalmiopsis> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Importance: Normal In-Reply-To: <20050107191046.161ea7ab@buddha.localdomain.de> X-Virus-Scanned: by amavisd-new-20040701 (2.0) at filter01.roc.ny.frontiernet.net Sender: owner-png-list@ccrc.wustl.edu Precedence: bulk Reply-To: png-list@ccrc.wustl.edu From: Matthias B. >Exactly. So what issue is there for png-list to discuss. It is a matter of opinion (i.e our opinions seem to differ). I believe it's appropriate to discuss how the spec might be being *ignored* (as opposed to, for example, misinterpreted) on this list. >Complaining about >programmers who don't follow the specs doesn't help anyone and I don't see >how we could improve the specs. It wasn't a complaint. I can think of a complaint, but it isn't about such programmers. >Besides, if I'm not mistaken, dropping the alpha channel does yield a >possible composition result, namely the result of setting the background >to a copy of the image without alpha (i.e. fully opaque) ;-) and where does this (background) image come from? John Bowler -- Send the message body "help" to png-list-request@ccrc.wustl.edu From owner-png-list@ccrc.wustl.edu Fri Jan 7 12:42:05 2005 Received: from viruswall2.ccf.swri.edu (viruswall2.ccf.swri.edu [129.162.252.35]) by swrinde.nde.swri.edu (8.12.10/8.12.10) with ESMTP id j07Ig0f0018699 for ; Fri, 7 Jan 2005 12:42:00 -0600 (CST) Received: from ccf.swri.edu (localhost [127.0.0.1]) by viruswall2.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j07Ifxvi013818 for ; Fri, 7 Jan 2005 12:42:00 -0600 (CST) Received: from ([129.162.1.33]) by ironmail.ccf.swri.edu with ESMTP id KP-GLL73.4454642; Fri, 07 Jan 2005 12:41:26 -0600 Received: from ccrc.wustl.edu (dns.ccrc.wustl.edu [128.252.169.100]) by mailhub.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j07IfPUd017415; Fri, 7 Jan 2005 12:41:25 -0600 (CST) Received: (from majordom@localhost) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) id j07If3T21877; Fri, 7 Jan 2005 12:41:03 -0600 (CST) X-Authentication-Warning: ccrc.wustl.edu: majordom set sender to owner-png-list@ccrc.wustl.edu using -f Received: from b.mail.sonic.net (b.mail.sonic.net [64.142.19.5]) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) with ESMTP id j07If2Q21873 for ; Fri, 7 Jan 2005 12:41:03 -0600 (CST) Received: from bolt.sonic.net (bolt.sonic.net [208.201.242.18]) by b.mail.sonic.net (8.12.11/8.12.11) with ESMTP id j07If2WE024897 for ; Fri, 7 Jan 2005 10:41:02 -0800 Received: from bolt.sonic.net (IDENT:roelofs@localhost [127.0.0.1]) by bolt.sonic.net (8.12.10/8.12.1) with ESMTP id j07If2lg022886 for ; Fri, 7 Jan 2005 10:41:02 -0800 Received: (from roelofs@localhost) by bolt.sonic.net (8.12.10/8.12.1/Submit) id j07If2wU022885 for png-list@ccrc.wustl.edu; Fri, 7 Jan 2005 10:41:02 -0800 Date: Fri, 7 Jan 2005 10:41:02 -0800 Message-Id: <200501071841.j07If2wU022885@bolt.sonic.net> From: Greg Roelofs To: png-list@ccrc.wustl.edu Subject: Re: [png-list] png_strip_lalpha problems (was: URGENT:INFO) In-Reply-To: <000301c4f4e7$88f07820$1001a8c0@kalmiopsis> Sender: owner-png-list@ccrc.wustl.edu Precedence: bulk Reply-To: png-list@ccrc.wustl.edu >> Besides, if I'm not mistaken, dropping the alpha channel does yield a >> possible composition result, namely the result of setting the background >> to a copy of the image without alpha (i.e. fully opaque) > ;-) and where does this (background) image come from? I believe he's saying that you would use the foreground (RGB-only part) as both the foreground *and* the background. Alpha-compositing X with X yields X (i.e., the RGB part) in that case. Interesting loophole... :-) Greg -- Send the message body "help" to png-list-request@ccrc.wustl.edu From owner-png-list@ccrc.wustl.edu Fri Jan 7 12:59:33 2005 Received: from viruswall2.ccf.swri.edu (viruswall2.ccf.swri.edu [129.162.252.35]) by swrinde.nde.swri.edu (8.12.10/8.12.10) with ESMTP id j07IxWf0020715 for ; Fri, 7 Jan 2005 12:59:32 -0600 (CST) Received: from ccf.swri.edu (localhost [127.0.0.1]) by viruswall2.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j07IxVvi015518 for ; Fri, 7 Jan 2005 12:59:32 -0600 (CST) Received: from ([129.162.1.33]) by ironmail.ccf.swri.edu with ESMTP id KP-GLL73.4455357; Fri, 07 Jan 2005 12:59:12 -0600 Received: from ccrc.wustl.edu (dns.ccrc.wustl.edu [128.252.169.100]) by mailhub.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j07IxBUd019849; Fri, 7 Jan 2005 12:59:11 -0600 (CST) Received: (from majordom@localhost) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) id j07Ix4C21924; Fri, 7 Jan 2005 12:59:04 -0600 (CST) X-Authentication-Warning: ccrc.wustl.edu: majordom set sender to owner-png-list@ccrc.wustl.edu using -f Received: from relay01.roc.ny.frontiernet.net (relay01.roc.ny.frontiernet.net [66.133.131.34]) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) with ESMTP id j07Ix4Q21920 for ; Fri, 7 Jan 2005 12:59:04 -0600 (CST) Received: from filter01.roc.ny.frontiernet.net (filter01.roc.ny.frontiernet.net [66.133.131.176]) by relay01.roc.ny.frontiernet.net (Postfix) with ESMTP id 37D2C10215 for ; Fri, 7 Jan 2005 18:59:04 +0000 (UTC) Received: from relay01.roc.ny.frontiernet.net ([66.133.131.34]) by filter01.roc.ny.frontiernet.net (filter01.roc.ny.frontiernet.net [66.133.131.176]) (amavisd-new, port 10024) with LMTP id 02821-08-88 for ; Fri, 7 Jan 2005 18:59:04 +0000 (UTC) Received: from cioch.kalmiopsis (67-136-241-233.bras01.myc.or.frontiernet.net [67.136.241.233]) by relay01.roc.ny.frontiernet.net (Postfix) with ESMTP id E46D81013F for ; Fri, 7 Jan 2005 18:58:57 +0000 (UTC) Received: from 192.168.1.16 (ident=unknown) by cioch.kalmiopsis with smtp (masqmail 0.2.18) id 1CmzK4-6gQ-00 for ; Fri, 07 Jan 2005 10:58:56 -0800 From: John Bowler To: Subject: RE: [png-list] png_strip_lalpha problems (was: URGENT:INFO) Date: Fri, 7 Jan 2005 10:58:54 -0800 Message-ID: <000401c4f4ea$f0115990$1001a8c0@kalmiopsis> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Importance: Normal In-Reply-To: <200501071841.j07If2wU022885@bolt.sonic.net> X-Virus-Scanned: by amavisd-new-20040701 (2.0) at filter01.roc.ny.frontiernet.net Sender: owner-png-list@ccrc.wustl.edu Precedence: bulk Reply-To: png-list@ccrc.wustl.edu From: Greg Roelofs >>> Besides, if I'm not mistaken, dropping the alpha channel does yield a >>> possible composition result, namely the result of setting the background >>> to a copy of the image without alpha (i.e. fully opaque) >I believe he's saying that you would use the foreground (RGB-only part) >as both the foreground *and* the background. Alpha-compositing X with X >yields X (i.e., the RGB part) in that case. That's what I assumed too. I.e. I assume the calculation, say for a GA image was: foreground * alpha + background * (1-alpha) [the basic calculation] hence: G * A + G * (1-A) == G But where does the *second* G come from? It comes from stripping the alpha channel from a PNG image doesn't it? But the only way of doing this by the spec is to composite the (background) image onto some background - where does *that* background come from? John Bowler -- Send the message body "help" to png-list-request@ccrc.wustl.edu From owner-png-list@ccrc.wustl.edu Fri Jan 7 13:29:39 2005 Received: from viruswall2.ccf.swri.edu (viruswall2.ccf.swri.edu [129.162.252.35]) by swrinde.nde.swri.edu (8.12.10/8.12.10) with ESMTP id j07JTcf0024168 for ; Fri, 7 Jan 2005 13:29:38 -0600 (CST) Received: from ccf.swri.edu (localhost [127.0.0.1]) by viruswall2.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j07JTbvk018340 for ; Fri, 7 Jan 2005 13:29:38 -0600 (CST) Received: from ([129.162.1.33]) by ironmail.ccf.swri.edu with ESMTP id KP-GLL73.4456581; Fri, 07 Jan 2005 13:29:18 -0600 Received: from ccrc.wustl.edu (dns.ccrc.wustl.edu [128.252.169.100]) by mailhub.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j07JTHUd024110; Fri, 7 Jan 2005 13:29:17 -0600 (CST) Received: (from majordom@localhost) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) id j07JSeL22008; Fri, 7 Jan 2005 13:28:40 -0600 (CST) X-Authentication-Warning: ccrc.wustl.edu: majordom set sender to owner-png-list@ccrc.wustl.edu using -f Received: from b.mail.sonic.net (b.mail.sonic.net [64.142.19.5]) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) with ESMTP id j07JSdQ22004 for ; Fri, 7 Jan 2005 13:28:40 -0600 (CST) Received: from bolt.sonic.net (bolt.sonic.net [208.201.242.18]) by b.mail.sonic.net (8.12.11/8.12.11) with ESMTP id j07JSeGW008186 for ; Fri, 7 Jan 2005 11:28:40 -0800 Received: from bolt.sonic.net (IDENT:roelofs@localhost [127.0.0.1]) by bolt.sonic.net (8.12.10/8.12.1) with ESMTP id j07JSelg027866 for ; Fri, 7 Jan 2005 11:28:40 -0800 Received: (from roelofs@localhost) by bolt.sonic.net (8.12.10/8.12.1/Submit) id j07JSd2p027865 for png-list@ccrc.wustl.edu; Fri, 7 Jan 2005 11:28:39 -0800 Date: Fri, 7 Jan 2005 11:28:39 -0800 Message-Id: <200501071928.j07JSd2p027865@bolt.sonic.net> From: Greg Roelofs To: png-list@ccrc.wustl.edu Subject: Re: [png-list] png_strip_lalpha problems (was: URGENT:INFO) In-Reply-To: <000401c4f4ea$f0115990$1001a8c0@kalmiopsis> Sender: owner-png-list@ccrc.wustl.edu Precedence: bulk Reply-To: png-list@ccrc.wustl.edu John wrote: > But where does the *second* G come from? It comes from stripping the alpha > channel from a PNG image doesn't it? But the only way of doing this by the > spec is to composite the (background) image onto some background - where > does *that* background come from? You seem to be interpreting the spec to say that *all* uses of the pixel data are prescribed, even those that are in addition to normal (and correct) usage as foreground data. But I don't see that, and I don't recall that such an interpretation was ever intended (or even contemplated, perhaps). In fact, the section you quoted (13.16) clearly states that "The PNG data- stream [does] not [define] the background image." So if an implementer chooses to composite the image against (part of) itself, technically that's allowed, at least as far as I can determine. Of course, it's still not actually *recommended*--due to the possibility of associated-alpha conversion--but not all alpha images are created that way, and the section also says that ignoring alpha is a useful option in some cases. Greg -- Send the message body "help" to png-list-request@ccrc.wustl.edu From owner-png-list@ccrc.wustl.edu Fri Jan 7 14:01:02 2005 Received: from viruswall2.ccf.swri.edu (viruswall2.ccf.swri.edu [129.162.252.35]) by swrinde.nde.swri.edu (8.12.10/8.12.10) with ESMTP id j07K12f0027720 for ; Fri, 7 Jan 2005 14:01:02 -0600 (CST) Received: from ccf.swri.edu (localhost [127.0.0.1]) by viruswall2.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j07K11vi021542 for ; Fri, 7 Jan 2005 14:01:01 -0600 (CST) Received: from ([129.162.1.33]) by ironmail.ccf.swri.edu with ESMTP id KP-GLL73.4458008; Fri, 07 Jan 2005 14:00:32 -0600 Received: from ccrc.wustl.edu (dns.ccrc.wustl.edu [128.252.169.100]) by mailhub.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j07K0WUd029016; Fri, 7 Jan 2005 14:00:32 -0600 (CST) Received: (from majordom@localhost) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) id j07K0OB22125; Fri, 7 Jan 2005 14:00:24 -0600 (CST) X-Authentication-Warning: ccrc.wustl.edu: majordom set sender to owner-png-list@ccrc.wustl.edu using -f Received: from pd3mo3so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) with ESMTP id j07K0NQ22121 for ; Fri, 7 Jan 2005 14:00:24 -0600 (CST) Received: from pd3mr5so.prod.shaw.ca (pd3mr5so-qfe3.prod.shaw.ca [10.0.141.12]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0I9Y00HFBQ8LXK20@l-daemon> for png-list@ccrc.wustl.edu; Fri, 07 Jan 2005 13:00:21 -0700 (MST) Received: from pn2ml3so.prod.shaw.ca ([10.0.121.147]) by pd3mr5so.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0I9Y00GRVQ8LHU50@pd3mr5so.prod.shaw.ca> for png-list@ccrc.wustl.edu; Fri, 07 Jan 2005 13:00:21 -0700 (MST) Received: from [192.168.1.14] (S0106000f669c4e0a.vc.shawcable.net [24.84.51.190]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with ESMTP id <0I9Y00K9IQ8K9P@l-daemon> for png-list@ccrc.wustl.edu; Fri, 07 Jan 2005 13:00:21 -0700 (MST) Received: from 127.0.0.1 (AVG SMTP 7.0.300 [265.6.9]); Fri, 07 Jan 2005 12:01:44 -0800 Date: Fri, 07 Jan 2005 12:01:44 -0800 From: Dave Martindale Subject: Re: [png-list] png_strip_lalpha problems (was: URGENT:INFO) In-reply-to: <200501071841.j07If2wU022885@bolt.sonic.net> To: png-list@ccrc.wustl.edu Message-id: <41DEEAA8.2060900@cs.ubc.ca> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Accept-Language: en-us, en References: <200501071841.j07If2wU022885@bolt.sonic.net> User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) Sender: owner-png-list@ccrc.wustl.edu Precedence: bulk Reply-To: png-list@ccrc.wustl.edu >I believe he's saying that you would use the foreground (RGB-only part) >as both the foreground *and* the background. Alpha-compositing X with X >yields X (i.e., the RGB part) in that case. > >Interesting loophole... :-) > > I think we discussed this a bit a long time ago. There are two common ways of handling images with alpha, where the RGB values are either premultiplied by alpha or not. The spec calls these cases premultiplied/associated alpha and non premultiplied/unassociated alpha respectively. One advantage of the premultiplied alpha form is that if you simply discard the alpha, the RGB channels are in effect the image already composited atop an implicit black background. This can be displayed directly with no problem other than the black background. But we chose non premultiplied alpha for PNG, and that means that using the RGB values alone gives incorrect images. Fully opaque pixels are fine, but partially transparent pixels appear opaque, and pixels that should be fully transparent can appear to have any colour depending on what's in the RGB channels. To get a usable RGB image when no background is available, a RGBA PNG *must* be converted to RGB by multiplying by alpha pixel-by-pixel before discarding the alpha. You can call the operation of just dropping alpha "compositing the image on top of itself" if you want, but the result is still an incorrect image. An argument could be made that premultiplied alpha is better than non-premultiplied alpha because of the ease of obtaining a displayable image when dropping alpha. The argument in favour of non-premultiplied alpha for PNG is that if you start out with non-premultiplied data, converting to premultiplied form effectively throws away some bits of RGB precision in the partially-transparent areas. I think TIFF allows both forms. We chose to have just one type of alpha, and chose the "more lossless" form instead of the "easier" form. Dave PS (and totally off topic): my wife and I have a new daughter who is keeping us busy. There are a couple of photos at -- Send the message body "help" to png-list-request@ccrc.wustl.edu From owner-png-list@ccrc.wustl.edu Fri Jan 7 14:30:20 2005 Received: from viruswall2.ccf.swri.edu (viruswall2.ccf.swri.edu [129.162.252.35]) by swrinde.nde.swri.edu (8.12.10/8.12.10) with ESMTP id j07KUFf0000643 for ; Fri, 7 Jan 2005 14:30:15 -0600 (CST) Received: from ccf.swri.edu (localhost [127.0.0.1]) by viruswall2.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j07KUEvi024607 for ; Fri, 7 Jan 2005 14:30:15 -0600 (CST) Received: from ([129.162.1.33]) by ironmail.ccf.swri.edu with ESMTP id KP-GLL73.4459341; Fri, 07 Jan 2005 14:29:49 -0600 Received: from ccrc.wustl.edu (dns.ccrc.wustl.edu [128.252.169.100]) by mailhub.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j07KTnUd003530; Fri, 7 Jan 2005 14:29:49 -0600 (CST) Received: (from majordom@localhost) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) id j07KT4Q22216; Fri, 7 Jan 2005 14:29:04 -0600 (CST) X-Authentication-Warning: ccrc.wustl.edu: majordom set sender to owner-png-list@ccrc.wustl.edu using -f Received: from b.mail.sonic.net (b.mail.sonic.net [64.142.19.5]) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) with ESMTP id j07KT1Q22212 for ; Fri, 7 Jan 2005 14:29:03 -0600 (CST) Received: from bolt.sonic.net (bolt.sonic.net [208.201.242.18]) by b.mail.sonic.net (8.12.11/8.12.11) with ESMTP id j07KT1dF025963 for ; Fri, 7 Jan 2005 12:29:01 -0800 Received: from bolt.sonic.net (IDENT:roelofs@localhost [127.0.0.1]) by bolt.sonic.net (8.12.10/8.12.1) with ESMTP id j07KT1lg032437 for ; Fri, 7 Jan 2005 12:29:01 -0800 Received: (from roelofs@localhost) by bolt.sonic.net (8.12.10/8.12.1/Submit) id j07KT1AW032436 for png-list@ccrc.wustl.edu; Fri, 7 Jan 2005 12:29:01 -0800 Date: Fri, 7 Jan 2005 12:29:01 -0800 Message-Id: <200501072029.j07KT1AW032436@bolt.sonic.net> From: Greg Roelofs To: png-list@ccrc.wustl.edu Subject: Re: [png-list] png_strip_lalpha problems (was: URGENT:INFO) In-Reply-To: <41DEEAA8.2060900@cs.ubc.ca> Sender: owner-png-list@ccrc.wustl.edu Precedence: bulk Reply-To: png-list@ccrc.wustl.edu Dave Martindale wrote: > But we chose non premultiplied alpha for PNG, and that means that using > the RGB values alone gives incorrect images. Fully opaque pixels are > fine, but partially transparent pixels appear opaque, and pixels that > should be fully transparent can appear to have any colour depending on > what's in the RGB channels. To get a usable RGB image when no > background is available, a RGBA PNG *must* be converted to RGB by > multiplying by alpha pixel-by-pixel before discarding the alpha. > You can call the operation of just dropping alpha "compositing the image > on top of itself" if you want, but the result is still an incorrect image. No, that's an overstatement. One of the cases we explicitly discussed (I know because I brought it up :-) ) was that of a photograph with a soft mask added later. The original photograph is still a fully valid and useful image, as is (I believe) the version composited against another image or against a plain background. The latter will appear to fade from one image to the other; it's not intended to look like glass artifacts on top of a different sky (like the icicles image). This is precisely where the specification comment comes from: (Of course, if the alpha channel is a separate transparency mask, then ignoring alpha is a useful option: it allows the hidden parts of the image to be recovered.) Greg -- Send the message body "help" to png-list-request@ccrc.wustl.edu From owner-png-list@ccrc.wustl.edu Fri Jan 7 19:41:32 2005 Received: from viruswall2.ccf.swri.edu (viruswall2.ccf.swri.edu [129.162.252.35]) by swrinde.nde.swri.edu (8.12.10/8.12.10) with ESMTP id j081fVf0021824 for ; Fri, 7 Jan 2005 19:41:31 -0600 (CST) Received: from ccf.swri.edu (localhost [127.0.0.1]) by viruswall2.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j081fUdM021780 for ; Fri, 7 Jan 2005 19:41:31 -0600 (CST) Received: from ([129.162.1.33]) by ironmail.ccf.swri.edu with ESMTP id KP-GLL73.4470945; Fri, 07 Jan 2005 19:41:10 -0600 Received: from ccrc.wustl.edu (dns.ccrc.wustl.edu [128.252.169.100]) by mailhub.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j081fAUd014051; Fri, 7 Jan 2005 19:41:10 -0600 (CST) Received: (from majordom@localhost) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) id j081eGv23037; Fri, 7 Jan 2005 19:40:16 -0600 (CST) X-Authentication-Warning: ccrc.wustl.edu: majordom set sender to owner-png-list@ccrc.wustl.edu using -f Received: from relay01.roc.ny.frontiernet.net (relay01.roc.ny.frontiernet.net [66.133.131.34]) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) with ESMTP id j081eFQ23033 for ; Fri, 7 Jan 2005 19:40:15 -0600 (CST) Received: from filter01.roc.ny.frontiernet.net (filter01.roc.ny.frontiernet.net [66.133.131.176]) by relay01.roc.ny.frontiernet.net (Postfix) with ESMTP id 5BA77FF5C for ; Sat, 8 Jan 2005 01:40:10 +0000 (UTC) Received: from relay01.roc.ny.frontiernet.net ([66.133.131.34]) by filter01.roc.ny.frontiernet.net (filter01.roc.ny.frontiernet.net [66.133.131.176]) (amavisd-new, port 10024) with LMTP id 03338-25-23 for ; Sat, 8 Jan 2005 01:40:10 +0000 (UTC) Received: from cioch.kalmiopsis (67-136-241-233.bras01.myc.or.frontiernet.net [67.136.241.233]) by relay01.roc.ny.frontiernet.net (Postfix) with ESMTP id DCBADFF2D for ; Sat, 8 Jan 2005 01:40:08 +0000 (UTC) Received: from 192.168.1.16 (ident=unknown) by cioch.kalmiopsis with smtp (masqmail 0.2.18) id 1Cn5aJ-75A-00 for ; Fri, 07 Jan 2005 17:40:07 -0800 From: John Bowler To: Subject: RE: [png-list] png_strip_lalpha problems (was: URGENT:INFO) Date: Fri, 7 Jan 2005 17:40:05 -0800 Message-ID: <000901c4f522$fbb087c0$1001a8c0@kalmiopsis> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Importance: Normal In-Reply-To: <200501071928.j07JSd2p027865@bolt.sonic.net> X-Virus-Scanned: by amavisd-new-20040701 (2.0) at filter01.roc.ny.frontiernet.net Sender: owner-png-list@ccrc.wustl.edu Precedence: bulk Reply-To: png-list@ccrc.wustl.edu From: Greg Roelofs >You seem to be interpreting the spec to say that *all* uses of the pixel >data are prescribed, even those that are in addition to normal (and correct) >usage as foreground data. I'm saying that all regular visualisations of the untransformed PNG image are prescribed, whereever that visualisation might appear. Notice that the specification even discusses rendering truecolor images on devices with restricted palettes (13.11), with restricted colour accuracy (13.12), different colour tristimulus encodings (13.14) and the latter includes *no* colour support (greyscale!) There's nothing in here which says that a PNG image used as a background is not subject to these rules. What is more any further data encoding, for example hiding a digital signature in the lower order bits of the representation, or hiding image data in samples where alpha==0, while it is *permitted* (i.e. nothing in the spec says this cannot be done) is not actually specified. In your response to Dave's posting (with which I agree completely) you quote the spec: (Of course, if the alpha channel is a separate transparency mask, then ignoring alpha is a useful option: it allows the hidden parts of the image to be recovered.) But removing the alpha channel in this way from an arbitrary PNG image is not going to do this - it is going to result in garbage! For the application to execute this trick (removing the alpha channel to expose hidden parts of the image) it must know a priori that the PNG image has this property. This is an extension of PNG! (It doesn't matter that the spec says this might be possible - the spec gives no way of knowing this can be done, to know it can be done it is necessary to somehow ensure that the PNG has this additional property for alpha==0 samples.) > But I don't see that, and I don't recall that >such an interpretation(*) was ever intended (or even contemplated, perhaps). (*) "*all* uses of the pixel data are prescribed" Surely the purpose of the spec is to ensure that every application which wishes to display PNG data does so in a consistent way? I'm saying the spec is prescriptive wrt visualisation of a PNG, to my mind an image as a background, even when an image is composited over this background, is a visualisation. >In fact, the section you quoted (13.16) clearly states that "The PNG data- >stream [does] not [define] the background image." So if an implementer >chooses to composite the image against (part of) itself, technically that's >allowed, at least as far as I can determine. Doesn't that sentence mean that, if a PNG data stream is interpreted as the foreground image it may be validly composited on *any* background? If the same data stream is interpreted as the background then surely that interpretation must itself be a valid one? If not then it would be equally valid to composite the image onto just the red channel of itself, or onto the low order bit of each channel or any other wacky transformation of the image! Removing the alpha channel from a PNG image does not produce a valid visualisation of that PNG image except in the case where alpha==1 throughout. It's a perfectly reasonably thing to do if the user asks for it to be done (for example I can use PhotoShop etc to extract or remove any channel from the image), but the result is a *transformation* of the original image, not a valid visualisation of the original image! Incidentally one very neat thing about Matthias's idea is that, if applied repeatedly (i.e. composite the image on itself an infinite number of times) it eventually produces the handle-alpha-as-transparency approach in the spec: "If a decoder contains only this much transparency capability, it should deal with a full alpha channel by treating all nonzero alpha values as fully opaque or by dithering." That's because the final value for component C for a sample with alpha a is: C.a + (1-a)(C.a + (1-a)(C.a + (1-a).(C.a + ... = C.a.(1 + (1-a) + (1-a)^2 + (1-a)^3 ...) [note: expansion of 1/(1-t) 0<=t<1, is 1+t+t^2...] =[a != 0] C.a.(1/a) = C [a == 0] 0 I.e unless the alpha is identically 0 the original non-premultiplied sample value is used, as in the spec! John Bowler -- Send the message body "help" to png-list-request@ccrc.wustl.edu From owner-png-list@ccrc.wustl.edu Mon Jan 10 00:00:23 2005 Received: from viruswall2.ccf.swri.edu (viruswall2.ccf.swri.edu [129.162.252.35]) by swrinde.nde.swri.edu (8.12.10/8.12.10) with ESMTP id j0A60JHM004017 for ; Mon, 10 Jan 2005 00:00:19 -0600 (CST) Received: from ccf.swri.edu (localhost [127.0.0.1]) by viruswall2.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j0A60ICw024981 for ; Mon, 10 Jan 2005 00:00:18 -0600 (CST) Received: from ([129.162.1.33]) by ironmail.ccf.swri.edu with ESMTP id KP-GLL73.4547179; Sun, 09 Jan 2005 23:59:39 -0600 Received: from ccrc.wustl.edu (dns.ccrc.wustl.edu [128.252.169.100]) by mailhub.ccf.swri.edu (8.12.10/8.12.6) with ESMTP id j0A5xdUd007368; Sun, 9 Jan 2005 23:59:39 -0600 (CST) Received: (from majordom@localhost) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) id j0A5x3I00859; Sun, 9 Jan 2005 23:59:03 -0600 (CST) X-Authentication-Warning: ccrc.wustl.edu: majordom set sender to owner-png-list@ccrc.wustl.edu using -f Received: from b.mail.sonic.net (b.mail.sonic.net [64.142.19.5]) by ccrc.wustl.edu (8.11.6+Sun/8.11.6) with ESMTP id j0A5x2Q00855 for ; Sun, 9 Jan 2005 23:59:02 -0600 (CST) Received: from bolt.sonic.net (bolt.sonic.net [208.201.242.18]) by b.mail.sonic.net (8.12.11/8.12.11) with ESMTP id j0A5x2bB005680 for ; Sun, 9 Jan 2005 21:59:02 -0800 Received: from bolt.sonic.net (IDENT:roelofs@localhost [127.0.0.1]) by bolt.sonic.net (8.12.10/8.12.1) with ESMTP id j0A5x2v5024787 for ; Sun, 9 Jan 2005 21:59:02 -0800 Received: (from roelofs@localhost) by bolt.sonic.net (8.12.10/8.12.1/Submit) id j0A5x2rI024786 for png-list@ccrc.wustl.edu; Sun, 9 Jan 2005 21:59:02 -0800 Date: Sun, 9 Jan 2005 21:59:02 -0800 Message-Id: <200501100559.j0A5x2rI024786@bolt.sonic.net> From: Greg Roelofs To: png-list@ccrc.wustl.edu Subject: Re: [png-list] png_strip_lalpha problems (was: URGENT:INFO) In-Reply-To: <000901c4f522$fbb087c0$1001a8c0@kalmiopsis> Sender: owner-png-list@ccrc.wustl.edu Precedence: bulk Reply-To: png-list@ccrc.wustl.edu [...lengthy discussion, mostly with John Bowler...] I'm trying to recall what the original point of this discussion was, and it seems to revolve around John's statement in the first message with this Subject line: BTW the common problem I am thinking of is that some application code has handled 'alpha' by simply stripping it and just displaying the remaining channels. That does not work, the values in the RGB channels are not correct for any pixel with 0