Link to home
Start Free TrialLog in
Avatar of UltimateWireforms
UltimateWireforms

asked on

Strange .png image behavior

I would really like to understand what is going on here --

Background:  We print thousands of labels daily using both thermal-transfer and inkjet printers.  All of these labels are custom designed, mostly in Loftware Label Manager Design32 software.  Most of these labels include "standardized" elements which we save as image files and then link to in the label design templates.  Many of these standardized elements have been in use for four or five years; all are saved as .png image files.

Yesterday, I upgraded to the most current version of the Loftware applications and quickly found out that it was unable to properly display these images.  Generally speaking, they would be cut off width-wise.  So, for example, an image that was supposed to show "REF" surrounded by a bordering box displayed as "RE" with the right side of the box cutoff as well as the F.  Note that it didn't matter how big I made the bounding box; the image was still cut off.  Even the image selection preview window shows the image cut off.

Some investigation revealed that these images were displayed properly by Windows Explorer as well as Windows Photo Viewer whereas Irfanview displays just a black box of the correct dimensions.  

I found that if I open the image in Paint and then simply re-save it (still as .png), both Irfanview and Loftware now display the image correctly.

I'd like to understand what is happening here.  Anyone have any ideas?

I've attached one of the images in question.
REF-BOX-011413.png
Avatar of Dr. Klahn
Dr. Klahn

The problem images could have been produced by an application that did not adhere 100% to the PNG specification.  In particular, if the IHDR is not 100% correct, what happens when a compliant application tries to read that file could end up undefined.  It is disturbing that Irfanview does not know what to do with the file.

However, I would first blame this on the application as it worked in the previous release.  The application's code may have been tightened up, or somebody made a boo-boo and introduced a bug.  Probably best to report this back to the software supplier along with some sample offending files, and ask them how to fix it.

https://www.w3.org/TR/2003/REC-PNG-20031110/#11IHDR
Avatar of UltimateWireforms

ASKER

Thanks for your reply.

I have contacted Loftware as I do believe the problem may be at least partly on their end and may be due to the fact that all of these images have transparent backgrounds.

Which brings me back to Irfanview - By default, Irfanview opens with a black workspace and, it turns out, all of these images are composed of black elements on a transparent background.  Hence, in Irfanview, nothing is visible unless one changes the workspace background.

Whoops!

And, the images are displayed properly in Loftware after opening and re-saving in Paint because it seems that Paint does not/cannot save the transparent background and instead saves it as "white".

I'll post back after I hear from Loftware.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.