Problem converting image to black and white

This area contains the messages from the old Yahoo gcmac group after the port.
Post Reply
Alan Fry
Posts: 0
Joined: Mon Oct 22, 2012 7:41 pm

Problem converting image to black and white

Post by Alan Fry »

The problem is as follows:Open 'BTCSlogo.png' in GC 8.8.3 (1388)NB The image has a transparent backgroundSelect 'GraphicConverter/Picture/Colours/Change to Deep Gray (16 bit)'This produces (on screen) exactly the expected resultSave as 'BTCSlogo-bw.png'This produces a file with a solid black background, rather than a transparent backgroundAlternatively at step 2 Save as 'BTCSlogo-bw.gif'This produces a file with a transparent background as expectedOpen the file 'BTCSlogo-bw.gif' in Preview and re-save as 'BTCSlogo-bw.png'This produces a file identical (in apperance) to the '.gif' with a transparent backgroundThe question is why does the transparent background turn solid black at step 3?All the files are attached in a zip archive (named LogoFile.zip) for anyone to experiment with.Alan FryMacPro 10.6.8
thorstenlemke
Posts: 0
Joined: Fri Dec 30, 2016 12:00 pm

Re: Problem converting image to black and white [1 Attachment]

Post by thorstenlemke »

Attachments :Dear Alan,the 8.8.3 do not have 16 bit PNG support.That does require the 9.1.Just leave at 8 bit per channel.Thorsten (important note: please always include this complete email in your reply)-----------------------------------------------------------------Thorsten LemkeLemke Software GmbHZum Rohkamp 5e31228 PeineGermanyPhone: +49 5171 72200 (German)Phone: +49 5171 72202 (English)Mobile:+49 171 1420235Fax:   +49 5171 72201WWW:   http://www.lemkesoft.comE-Mail:lemke@le ... omfacebook: http://www.facebook.com/LemkesoftXING: http://www.xing.com/profile/Thorsten_LemkeLinkedin: http://www.linkedin.com/in/thorstenlemkeBusiness details:Amtsgericht Hildesheim HRB 101500Gescha�ftsfuhrer Dipl.-Ing. Thorsten LemkeUSt.IdNr. DE204841752----------------------------------------------------------------- On 24.02.2014, at 12:20, Alan Fry <ajf@afco.demon.co.uk> wrote: The problem is as follows:Open 'BTCSlogo.png' in GC 8.8.3 (1388)NB The image has a transparent backgroundSelect 'GraphicConverter/Picture/Colours/Change to Deep Gray (16 bit)'This produces (on screen) exactly the expected resultSave as 'BTCSlogo-bw.png'This produces a file with a solid black background, rather than a transparent backgroundAlternatively at step 2 Save as 'BTCSlogo-bw.gif'This produces a file with a transparent background as expectedOpen the file 'BTCSlogo-bw.gif' in Preview and re-save as 'BTCSlogo-bw.png'This produces a file identical (in apperance) to the '.gif' with a transparent backgroundThe question is why does the transparent background turn solid black at step 3?All the files are attached in a zip archive (named LogoFile.zip) for anyone to experiment with.Alan FryMacPro 10.6.8<LogoFiles.zip>
Alan Fry
Posts: 0
Joined: Mon Oct 22, 2012 7:41 pm

Re: Problem converting image to black and white

Post by Alan Fry »

Hi Thorsten,Thanks for your email. However I get exactly the same result in 8 bits.Is the problem resolved in 9.1?Kind regards,AlanOn 24 Feb 201416:19, at   16:19, Thorsten Lemke wrote: Dear Alan,the 8.8.3 do not have 16 bit PNG support.That does require the 9.1.Just leave at 8 bit per channel.Thorsten (important note: please always include this complete email in your reply)-----------------------------------------------------------------Thorsten LemkeLemke Software GmbHZum Rohkamp 5e31228 PeineGermanyPhone: +49 5171 72200 (German)Phone: +49 5171 72202 (English)Mobile:+49 171 1420235Fax:   +49 5171 72201WWW:   http://www.lemkesoft.comE-Mail:lemke@le ... omfacebook: http://www.facebook.com/LemkesoftXING: http://www.xing.com/profile/Thorsten_LemkeLinkedin: http://www.linkedin.com/in/thorstenlemkeBusiness details:Amtsgericht Hildesheim HRB 101500Gescha�ftsfuhrer Dipl.-Ing. Thorsten LemkeUSt.IdNr. DE204841752----------------------------------------------------------------- On 24.02.2014, at 12:20, Alan Fry <ajf@afco.demon.co.uk> wrote:The problem is as follows:Open 'BTCSlogo.png' in GC 8.8.3 (1388)NB The image has a transparent backgroundSelect 'GraphicConverter/Picture/Colours/Change to Deep Gray (16 bit)'This produces (on screen) exactly the expected resultSave as 'BTCSlogo-bw.png'This produces a file with a solid black background, rather than a transparent backgroundAlternatively at step 2 Save as 'BTCSlogo-bw.gif'This produces a file with a transparent background as expectedOpen the file 'BTCSlogo-bw.gif' in Preview and re-save as 'BTCSlogo-bw.png'This produces a file identical (in apperance) to the '.gif' with a transparent backgroundThe question is why does the transparent background turn solid black at step 3?All the files are attached in a zip archive (named LogoFile.zip) for anyone to experiment with.Alan FryMacPro 10.6.8<LogoFiles.zip>
thorstenlemke
Posts: 0
Joined: Fri Dec 30, 2016 12:00 pm

Re: Problem converting image to black and white

Post by thorstenlemke »

Hi Alan,an alpha channel is only support in 32 or 64 bit image.So, it is dropped upon save.Thorsten On 25.02.2014, at 12:00, Alan Fry <ajf@afco.demon.co.uk> wrote: Hi Thorsten,Thanks for your email. However I get exactly the same result in 8 bits.Is the problem resolved in 9.1?Kind regards,Alan
Alan Fry
Posts: 0
Joined: Mon Oct 22, 2012 7:41 pm

Re: Problem converting image to black and white

Post by Alan Fry »

Hi Thorsten,Thanks again. But I am still curious. The alpha channel is not removed when saving the gray-scale image to '.gif,' but it is when saving to '.png'. Why the difference?I can get what I want by saving the gray-scale to '.gif' (in GC) and then changing the format to '.png' using some other application such as Preview.app. That works but it is an odd procedure to have to undertake.Kind regards,Alan On 25 Feb 201414:55, at   14:55, Thorsten Lemke wrote:   Hi Alan,an alpha channel is only support in 32 or 64 bit image.So, it is dropped upon save.Thorsten On 25.02.2014, at 12:00, Alan Fry <ajf@afco.demon.co.uk> wrote:Hi Thorsten,Thanks for your email. However I get exactly the same result in 8 bits.Is the problem resolved in 9.1?Kind regards,Alan
thorstenlemke
Posts: 0
Joined: Fri Dec 30, 2016 12:00 pm

Re: Problem converting image to black and white

Post by thorstenlemke »

Hi Alan,a GIF supports only one transparent color and not an alpha channel. So, I convert the file that way manually.This is currently not done for PNG at 8 bit grayscale. I will add it to the todo list.ThorstenOn 25.02.2014, at 16:24, Alan Fry <ajf@afco.demon.co.uk> wrote: Hi Thorsten,Thanks again. But I am still curious. The alpha channel is not removed when saving the gray-scale image to '.gif,' but it is when saving to '.png'. Why the difference?I can get what I want by saving the gray-scale to '.gif' (in GC) and then changing the format to '.png' using some other application such as Preview.app. That works but it is an odd procedure to have to undertake.Kind regards,Alan
Alan Fry
Posts: 0
Joined: Mon Oct 22, 2012 7:41 pm

Re: Problem converting image to black and white

Post by Alan Fry »

On 25 Feb 201415:27, at   15:27, Thorsten Lemke wrote:   Hi Alan,a GIF supports only one transparent color and not an alpha channel. So, I convert the file that way manually.This is currently not done for PNG at 8 bit grayscale. Ah... I see...I didn't know that. I will add it to the todo list.It's not a matter of any urgency as far as I am concerned. It was more a matter of curiosity as to why the behaviour is what it is.But thank you very much Thorsten for taking the time out to explain matters.Kind regards,AlanThorstenOn 25.02.2014, at 16:24, Alan Fry <ajf@afco.demon.co.uk> wrote:Hi Thorsten,Thanks again. But I am still curious. The alpha channel is not removed when saving the gray-scale image to '.gif,' but it is when saving to '.png'. Why the difference?I can get what I want by saving the gray-scale to '.gif' (in GC) and then changing the format to '.png' using some other application such as Preview.app. That works but it is an odd procedure to have to undertake.Kind regards,Alan
bdgmdmba
Posts: 0
Joined: Wed Mar 05, 2014 6:54 am

Re: Problem converting image to black and white

Post by bdgmdmba »

Test post bdg
Post Reply