It is currently Fri Jul 26, 2024 1:31 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Gimp 2.8 on XP - issues exporting png file
PostPosted: Tue Aug 06, 2013 10:25 pm  (#1) 
Offline
GimpChat Member

Joined: May 19, 2013
Posts: 16
Trying to export a file as .png but the file prints full page size not the dimensions it actually is...

I can print the .xcf file correctly np.

Any thoughts?


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Gimp 2.8 on XP - issues exporting png file
PostPosted: Wed Aug 07, 2013 3:44 am  (#2) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4758
As far as I can tell, Gimp properly encodes the "pHys" chunk that indicates the print definition.(if you have ticked the proper check box in the PNG save options, but this is the default).

If you have an hexadecimal editor, edit the PNG and check for "pHYs": You should get something like:
70 48 59 73 00 00 0F 61 00 00 0F 61 01
p  H  Y  s  [x - resol] [y - resol] [unit]


Here, 0xF61 is 3937 and since Unit "01" is dots/meter, this is indeed 3937 x 0.0254=100 dots/inch (which is the value I have in the "Print size" dialog in Gimp).

So it may be a problem with the software you use to print the file. PNG support in XP itself is likely lousy (IE was the last of the browsers to properly support PNG).

If you post the file somewhere I'll check its header.

_________________
Image


Top
 Post subject: Re: Gimp 2.8 on XP - issues exporting png file
PostPosted: Wed Aug 07, 2013 5:22 pm  (#3) 
Offline
GimpChat Member

Joined: May 19, 2013
Posts: 16
Hi - thanks for trying to help - I don't really understand any of what you said but I uploaded the file to my server so you can read the header.

< http://www.cjoakley.com/temp/pw-bookmark1.png >

The software part might make some sense but in both cases I'm using the same printer so I don't really understand how that could be either...

Anyway I appreciate any help you can give me - let me know if the header reveals anything to you...

Chris


Top
 Post subject: Re: Gimp 2.8 on XP - issues exporting png file
PostPosted: Wed Aug 07, 2013 6:16 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14730
Location: USA
Here is what i get in my editor.
Image

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Gimp 2.8 on XP - issues exporting png file
PostPosted: Wed Aug 07, 2013 6:53 pm  (#5) 
Offline
GimpChat Member

Joined: May 19, 2013
Posts: 16
Hi Rod - can you translate for me? I haven't the faintest idea what any of that means I'm afraid...

Thanks,
Chris


Top
 Post subject: Re: Gimp 2.8 on XP - issues exporting png file
PostPosted: Wed Aug 07, 2013 8:17 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14730
Location: USA
ChrisO wrote:
Hi Rod - can you translate for me? I haven't the faintest idea what any of that means I'm afraid...

Thanks,
Chris

Physical Pixel Dimensions (pHYs)
The pHYs chunk encodes the absolute or relative dimensions of pixels. For example, an image scanned at 600 dots per inch has pixels with known, absolute sizes--namely, one six-hundredth of an inch in both x and y directions. Alternatively, an image created on a 1280 × 1024 display will have non square pixels, and the relative dimensions of each pixel, also referred to as the aspect ratio, may be stored so the image can be displayed as it was intended to be seen.
To get the code translated to actual pixel width we will need ofnuts help. :)
For a GIF you would take the 2nd number multiply that by 256 and add the 1st number for a width. Then you would take the 4th number multiply that by 256 and add the 3rd number for height.
This doesn't work in this case for your PNG format. The results would be far to wide and tall. :)
For a GIF the example would be-
Example: "47 49 46 38 39 61 96 01 57 02" The width is the 7th and 8th bit, but the numbers are reversed. For GIF, take the 8th bit (01) and multiply by 256, then add the 7th bit (96). Gives you a width of 352. The height, take the 10th bit (02) and multiply by 256, then add the 9th bit (57) to give you 569.

When i go to Image>Print Size in Gimp i get these dimensions which seem correct.
Image

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Gimp 2.8 on XP - issues exporting png file
PostPosted: Wed Aug 07, 2013 8:23 pm  (#7) 
Offline
GimpChat Member

Joined: May 19, 2013
Posts: 16
Thanks Rod - so I take it this means that somehow the pHYs is incorrect but not sure how that would happen or why...and how to change it is a complete mystery :roll:

...and I get the same details in Gimp that you do.


Top
 Post subject: Re: Gimp 2.8 on XP - issues exporting png file
PostPosted: Wed Aug 07, 2013 8:29 pm  (#8) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14730
Location: USA
ChrisO wrote:
Thanks Rod - so I take it this means that somehow the pHYs is incorrect but not sure how that would happen or why...and how to change it is a complete mystery :roll:

...and I get the same details in Gimp that you do.


I am not sure if my editor results for physical size are correct or not. They very well could be. I do not know how to read them for PNG images. Hope ofnuts will show us. :)
Seems like there would be help in my manual but i can't find anything. Sorry.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Gimp 2.8 on XP - issues exporting png file
PostPosted: Wed Aug 07, 2013 8:34 pm  (#9) 
Offline
GimpChat Member

Joined: May 19, 2013
Posts: 16
Hey - no worries Rod - I really appreciate the help you've given me already...

...guess we'll both have to wait for ofnuts to explain :bigthup


Top
 Post subject: Re: Gimp 2.8 on XP - issues exporting png file
PostPosted: Wed Aug 07, 2013 9:20 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14730
Location: USA
Well i did notice that the 1st 4 bits ( 70 48 59 73 ) are the same as ofnuts results in his editor. So maybe that indicates that GIMP is correct and the browser software is not?

ofnuts which hex editor do you use?
I am using Frhed - http://frhed.sourceforge.net/en/ free hex editor 1.7.1.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Trouble exporting to .psd

2

No new posts Exporting as PSD from Python?

2

No new posts Filled path not exporting with fill

4

No new posts Performance of adjusting layers and exporting with Python Fu

5

No new posts Attachment(s) exporting 256-color indexed png & gif missing transparency

9



* Login  



Powered by phpBB3 © phpBB Group