mkidd Posted September 6, 2008 Share Posted September 6, 2008 When I try to load a certain PNG image in Paint.NET 3.36, I get the message "There was an error opening the file." without any further details. The image opens fine in Windows Picture and Fax Viewer (WPFV), Microsoft Office 2003 Picture Manager, IrfanView (4.10), Photoshop 5.5, and Matlab. The image file is about 1.4 MB, which exceeds the 256 KB limit imposed by the forum software, but I would be happy send it by other means. The only obviously peculiar thing about the file is that it has the exact same data on each image plane, i.e. it is a grayscale inefficiently stored in an RGB format. This PNG was created from a 24-bit TIFF file using WPFV. Paint.NET could not load the TIFF file either, although all the other applications cited above could. Curiously though, if I convert the TIFF to BMP using WPFV, Paint.NET can read the BMP file. And more bizarrely, I can load the PNG into Photoshop and save it again a new PNG file using the default PNG save options (Interface: None / Filter: Adaptive) and then read the resulting smaller (1099 KB) file into Paint.NET successfully. Other Photoshop save options, e.g. None/None or Adam7/Adaptive also yield PNG files that Paint.NET can read. Quote Link to comment Share on other sites More sharing options...
Myrddin Posted September 6, 2008 Share Posted September 6, 2008 The image file is about 1.4 MB, which exceeds the 256 KB limit imposed by the forum software, but I would be happy send it by other means.You can package the image into a ZIP file, then upload to an online host such as MediaFire. Provide the link and let us have a gander.At the moment, to me it does sound peculiar indeed. I cannot speak for other users here, but having the image to examine would be the best option right now. Quote How to Save Your Images under Different File Types My dA Gallery Link to comment Share on other sites More sharing options...
mkidd Posted September 6, 2008 Author Share Posted September 6, 2008 The image is now available at http://www.mediafire.com/file/4ckcvig7ulq/Beads.png SHA1 Hash: E31E33ABE9C5FBF37E005207646F2251C0E2F1AD Quote Link to comment Share on other sites More sharing options...
Zagna Posted September 6, 2008 Share Posted September 6, 2008 I just tried some different ways to fiddle with out of pure boredom. Resaving it with Irfanview or GIMP -> OK file Resaving it with WPFV, Windows Photo Gallery, Windows Live Photo Gallery -> BAD file No idea what's wrong here... just bored Quote Link to comment Share on other sites More sharing options...
Myrddin Posted September 6, 2008 Share Posted September 6, 2008 This is truly puzzling. Does this occur only with this one image, or with others too? The only 'fix' I can suggest is to resave it another application if you are wanting to edit it in Paint.NET. If there is a silver-lining to this black cloud, it's that the image can be opened elsewhere, hence I would do so. I cannot shed any more light on this, perhaps someone else could...? Quote How to Save Your Images under Different File Types My dA Gallery Link to comment Share on other sites More sharing options...
mkidd Posted September 10, 2008 Author Share Posted September 10, 2008 I think I figured this one out. If I remove the pHYs chunk from PNG file (in my case using a hex editor), Paint.NET loads the image fine. That means removing this sequence of bytes starting at file offset 0x6a. 00 00 00 09 70 48 59 73 00 00 00 00 00 00 00 00 01 ea 65 16 a4 The first long int (00 00 00 09) specifies the chunk data size. The next four bytes (80 48 59 73 = pHYs) specify the chunk type and the final long int is a checksum. According to the PNG 2.1 specification, the chunk data itself specifies the X and Y pixel dimensions, (long ints) either as an aspect ratio (if last byte is 0) or pixels / meter (if last byte is 1). The data in the problematic file translates to 0 pixels / meter in each dimension. The standard does not address how 0 should be treated, which presumably results in to library dependent behavior. My understanding is that Paint.NET uses .NET libraries for loading images and they may be taking a strict view on the matter and throwing an exception, literally or figuratively. Most PNG files simply do not include the pHYs chunk in which case the standard directs decoders to assume a 1:1 aspect ratio, i.e. square pixels. I think the software for the scientific camera we are using wrote a slightly invalid TIFF file, i.e. one with the pixel aspect ratio explicitly defined as 0:0. Photoshop probably saw this explicit definition and blindly mapped it to the pHYs chunk. Quote Link to comment Share on other sites More sharing options...
raylogic Posted January 29, 2010 Share Posted January 29, 2010 Hello, I am suffering this same problem, last night printed off a drawing (the desktop I was working on was sized to A3 to match the required print out) then saved and closed the drawing, remembered I needed a 2nd copy so attempted to re open the file without success. When I clicked properties it showed file type as 'file' and the size as '804kb', I cant save it to a different format as it wont open, tried renaming it with extensions like .jpeg, .png etc and opening in other programs but the cant open it either. Ugg Help R. Quote Link to comment Share on other sites More sharing options...
Sarkut Posted January 29, 2010 Share Posted January 29, 2010 (edited) raylogic, Can you upload the file, as suggested here: Edited April 7, 2010 by Sarkut Quote Link to comment Share on other sites More sharing options...
raylogic Posted January 29, 2010 Share Posted January 29, 2010 Hi there, Mediafire is cool that was easy enough. Gave me the option of two links so here they both are:- http://www.mediafire.com/?zymyn2lm1ui http://www.mediafire.com/file/zymyn2lm1ui/Install drawing.zip Thanks for your time with this. R. Quote Link to comment Share on other sites More sharing options...
Sarkut Posted January 29, 2010 Share Posted January 29, 2010 Here you go: http://www.mediafire.com/?ywolygoyoim The file was saved with a .png extension, but hadn't been flattened before saving. Quote Link to comment Share on other sites More sharing options...
mkidd Posted January 29, 2010 Author Share Posted January 29, 2010 The file from ray-logic (http://www.mediafire.com/?zymyn2lm1ui) with the .png extension is not a PNG file but rather what appears to be a PDN file which mistakenly has the .png extension. The first four characters of the file are 'PDN3'. When opened in Paint.NET 3.5.2 it also generates the unhelpful "There was an error opening the file." message though the reason is much more straightforward than the case that started this thread. Quote Link to comment Share on other sites More sharing options...
raylogic Posted January 31, 2010 Share Posted January 31, 2010 Thank You. R. Ps. Arrgghh The mediafire link dont seem to do anything.. PPs. It says the file has been removed. Any chance you could put it up again Resolved - Firefox blocked some add on which needed installed to allow the download, normal internet explorer allowed it to be downloaded. A big thank you. R. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.