Thursday, 27 November 2008

Does my PNG look bad in this (journal)?

Did you ever submit a carefully-crafted image to a journal only to find that it looks terrible in the proofs from the publisher? This happened to me recently, and it took several iterations with the publisher to figure out what was happening.

The problem turned out to be transparency in PNGs. Basically, when you export a PNG from Inkscape, the background is left transparent and, more importantly, shading (e.g. to remove the jaggedness of diagonal lines) is done by mixing in a transparent layer called the alpha channel. Despite PNGs being around for years, it was only a couple of years ago that Internet Explorer finally got with the programme and handled transparency in PNGs. However, it seems it's still a problem with some publishers.

So, how to "fix" it? Open in Gimp, "Layer", "Transparency", "Remove Alpha Channel", "File", "Save". If you don't have an alpha channel, then the "Remove Alpha Channel" option will not be available.

Update 28/Nov/08: Pierre Lindenbaum suggested an alternative remedy: you can just draw a big white rectangle behind your image in Inkscape and everything will be okay. Paweł Szczęsny points out a better solution: in Inkscape, go to "File", "Document Properties", "Page", "Background", "RGB" and set the four values to 255 (white background, no alpha transparency).

3 comments:

pansapiens said...

"Did you ever submit a carefully-crafted image to a journal only to find that it looks terrible in the proofs from the publisher?" ...

[rant]
Yes, I have, and I was a little disappointed that a 'professional' publisher, with all their specific requirements for CMYK Tiffs etc didn't have their pre-press guys tweak the colour of the image. Scientists shouldn't need to have Pantone swatches and perfectly calibrated monitors ... that's presumably what page charges and subscriptions (should) pay for ...
[/rant]

Anyhow, nice Gimp tip. Could come in handy in the future.

Bjoern Brembs said...

Is there a way to get the FriendFeed widget you have at the bottom of each post? I've searched but couldn't find it...
Thanks! Bjoern

baoilleach said...

Sorry - I didn't have time to reply on FF. The code is at http://www.pathawks.com/2008/06/friendfeed-comment-widget.html