Hello!
When I run program "convert in.bmp out.jpg" dpi and print sizes are modified.
For example
Image: in.bmp
Format: BMP3 (Microsoft Windows bitmap image (V3))
Class: DirectClass
Geometry: 2338x1653+0+0
Resolution: 78.34x78.34
Print size: 29.8443x21.1003
Units: PixelsPerCentimeter
Image: out.jpg
Format: JPEG (Joint Photographic Experts Group JFIF format)
Mime type: image/jpeg
Class: DirectClass
Geometry: 2338x1653+0+0
Resolution: 78x78
Print size: 29.9744x21.1923
Units: PixelsPerCentimeter
What should I do to keep exact geometry and print size?
Keep print size while converting bmp/png files
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Keep print size while converting bmp/png files
This is may just be a precision issue when using identify after conversion. The Resolution may simply be rounded or truncated to an integer when showing the value in identify. The IM developers will have to comment further.
Re: Keep print size while converting bmp/png files
It's not an issue in identify, because if I save bmp to jpg manually via XnView I have a difference in 4-th digit of print size.
Is there any workaround to fix print size via Imagemagick, for example:
1 - read print size from bpm
2 - convert bmp to jpg
3 - set print size to jpg without modifying pixels?
Is there any workaround to fix print size via Imagemagick, for example:
1 - read print size from bpm
2 - convert bmp to jpg
3 - set print size to jpg without modifying pixels?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Keep print size while converting bmp/png files
BMP stores resolution as an integer number of pixels per metre, eg 7834 ppm. This is equivalent to pixels per centimetre with two decimal places, eg 78.34 ppcm.
I think JPEG stores resolution as integer number of pixels per centimetre or per inch. So 78.34 ppcm will be rounded to 78 ppcm.
I think JPEG stores resolution as integer number of pixels per centimetre or per inch. So 78.34 ppcm will be rounded to 78 ppcm.
snibgo's IM pages: im.snibgo.com
Re: Keep print size while converting bmp/png files
Is it possible to set custom print size to jpg without modifying pixels?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Keep print size while converting bmp/png files
ImageMagick will always read the input and write the output even if just changing density.
You could use EXIFTOOL to reset the density without modifying the image pixels.