300 dpi TIF-> 72 dpi JPG in one line (Windows)

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
ipgimg
Posts: 4
Joined: 2011-07-27T14:55:01-07:00
Authentication code: 8675308

300 dpi TIF-> 72 dpi JPG in one line (Windows)

Post by ipgimg »

Hi,

I'm trying to convert a 300 dpi TIF file to a 72 dpi JPG (on Windows).

If I do

Code: Select all

convert  in.tif  -density 72x72  out.tif
I get the TIF file with the same pixel dimensions but at 72 dpi (almost what I need). If I do

Code: Select all

convert  in.tif  -density 72x72  out.jpg
I get the JPG file with the same pixel dimensions but at 300 dpi

What is the command to do both, so that I get a JPG with the same pixel dimensions as the input file and 72 dpi resolution? Seems like it should be so simple but I'm struggling.

If I use resample I get an image still at 300 dpi but with smaller dimensions instead of an image with the same dimensions but different dpi. If I take the 72 dpi TIF and convert out.tif out.jpg afterwards it goes back to 300 dpi.

Thanks
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: 300 dpi TIF-> 72 dpi JPG in one line (Windows)

Post by anthony »

How did you test that... photoshop...

You will need to remove the Photoshop specific profile from the image. conversion from TIFF to JPEG would preserve that profile, and photoshop will see and use it instead of the standard JPEG resoultion settings that IM modified.

See TIFF, sction on "Tiff and Density (resolution) in photoshop..."
http://www.imagemagick.org/Usage/formats/#tiff
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
ipgimg
Posts: 4
Joined: 2011-07-27T14:55:01-07:00
Authentication code: 8675308

Re: 300 dpi TIF-> 72 dpi JPG in one line (Windows)

Post by ipgimg »

Thanks, I'm not using Photoshop at all but that is undoubtedly where the images originally come from. I used -strip to take out the profiles and got the 72 dpi JPG with

Code: Select all

convert in.tif  -strip -density 72 out.jpg
Is there a way to remove just the Photoshop profile/information? Or could I use two -profile commands to assume input profile and convert to an output profile?
Post Reply