I am trying to convert a .bmp image to a tif image with 300x300 resolution. Convert is making a conversion but the resolution of the created .tif file is not specified so subsequent operations on the .tif file are failing. Any ideas or suggestions on how to make this work?
Thanks
Mike
Platform: Win32
Results of Convert using -Verbose:
>convert -verbose Mike161755.bmp -verbose Mike161755.tif
Mike161755.bmp BMP 208x112+0+0 PseudoClass 2c 8-bit 3198b 0.0u 0:01
Mike161755.bmp BMP 208x112+0+0 PseudoClass 2c 8-bit 3198b 0.0u 0:01
TIFF Directory at offset 0x0
Image Width: 208 Image Length: 112
Bits/Sample: 1
Compression Scheme: CCITT Group 4
Photometric Interpretation: min-is-white
FillOrder: msb-to-lsb
Software: "ImageMagick 5.4.9 09/01/02 Q16 http://www.imagemagick.org"
Document Name: "Mike161755.tif"
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 1
Rows/Strip: 112
Planar Configuration: single image plane
Mike161755.bmp=>Mike161755.tif TIF 208x112+0+0 PseudoClass 2c 8-bit 0.0u 0:01
Convert .bmp to .tif with specific resolution
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert .bmp to .tif with specific resolution
what is your exact command and can you provide a link to your bmp file so others can check if it has any problems or try the conversion?
did you include -density 300?
did you include -density 300?
Re: Convert .bmp to .tif with specific resolution
After making this post I continued my research and found -density (as fmw42 noted) (I must have missed it on my first pass of the Convert documentation). Anyway I got it working as I wanted it to work using the following:
convert Myfile.bmp -density 300x300 -units pixelsperinch Myfile.tif
This is the verbose output.
Mike095943.bmp BMP 608x192+0+0 PseudoClass 2c 8-bit 14654b 0.0u 0:01
Mike095943.bmp BMP 608x192+0+0 PseudoClass 2c 8-bit 14654b 0.0u 0:01
TIFF Directory at offset 0x0
Image Width: 608 Image Length: 192
Resolution: 300, 300 pixels/inch
Bits/Sample: 1
Compression Scheme: CCITT Group 4
Photometric Interpretation: min-is-white
FillOrder: msb-to-lsb
Software: "ImageMagick 5.4.9 09/01/02 Q16 http://www.imagemagick.org"
Document Name: "C:\Firestone\3.07\Source\image\Mike095943.tif"
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 1
Rows/Strip: 192
Planar Configuration: single image plane
Mike095943.bmp=>Mike095943.tif TIF 608x192+0+0 PseudoClass 2c 8-bit 0.0u 0:01
Thanks for your help
Mike
convert Myfile.bmp -density 300x300 -units pixelsperinch Myfile.tif
This is the verbose output.
Mike095943.bmp BMP 608x192+0+0 PseudoClass 2c 8-bit 14654b 0.0u 0:01
Mike095943.bmp BMP 608x192+0+0 PseudoClass 2c 8-bit 14654b 0.0u 0:01
TIFF Directory at offset 0x0
Image Width: 608 Image Length: 192
Resolution: 300, 300 pixels/inch
Bits/Sample: 1
Compression Scheme: CCITT Group 4
Photometric Interpretation: min-is-white
FillOrder: msb-to-lsb
Software: "ImageMagick 5.4.9 09/01/02 Q16 http://www.imagemagick.org"
Document Name: "C:\Firestone\3.07\Source\image\Mike095943.tif"
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 1
Rows/Strip: 192
Planar Configuration: single image plane
Mike095943.bmp=>Mike095943.tif TIF 608x192+0+0 PseudoClass 2c 8-bit 0.0u 0:01
Thanks for your help
Mike
Re: Convert .bmp to .tif with specific resolution
+1 this helped me tooucmlamb wrote:[...]
Anyway I got it working as I wanted it to work using the following:
convert Myfile.bmp -density 300x300 -units pixelsperinch Myfile.tif
[...]
(should it not be the default?)
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert .bmp to .tif with specific resolution
I think the default is the units in your input image.
Re: Convert .bmp to .tif with specific resolution
ok, that makes sense, too.fmw42 wrote:I think the default is the units in your input image.