PNGOverlay Error

AlexMacAlexMac Global Mapper UserPosts: 7
edited August 2010 in Technical Support
Hi there

I deal with thousand and thousands of PNG map tiles and every now and then I get the following error message when attmepting to load a particular tile in GM:

Unable to open PNG file C:\etcetc
Read Error
PNGOverlay.cpp - 76
Version: v11.02

Can anyone tell me what this error specifically relates to? The PNG files in question won't open in Photoshop for example so I'm guessing they must be corrupt in some way. I'd like to understand what is stopping the files from opening and therefore debug the program that is generating them.

Many thanks

Alex

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited August 2010
    Alex,

    If you can post one of the error PNG files I can perhaps tell you more about exactly why it won't load.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • AlexMacAlexMac Global Mapper User Posts: 7
    edited August 2010
    Thanks Mike.

    Please see attached .ZIP containing one of the .PNG files. As far as I can tell the headers etc you expect for a .PNG file are present but something appears to be going wroing in the middle.

    Thank you for your help.
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited August 2010
    The file appears to be truncated in some way. The libpng library that we use for PNG import and export (the same library that pretty much every PNG application uses) is trying to ready a buffer of size 8192 bytes from the file, but only 16 bytes are present from the location the library is trying to read. It looks to me like maybe the PNG header is valid, but the actual data is missing or truncated.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
Sign In or Register to comment.