It is a construct based on output capabilities of hardware. One thing to realize is that DPI has nothing to do with the data in an image. If yes, kindly assist me as I am stuck here for the long time. Is it possible to achieve the same using FFMPEG. magick convert 'test.tif' 'test.jpg': converted to jpg and dpi is 300.Tried -q:v and -qscale options, but it's just changing the width and height of image.įinally I heard about ImageMagick and problem is solved in first attempt by using following command: ffmpeg -y -i test.tif -pix_fmt test.gif (tried all 3 supported format:yuvj420p,yuvj422p yuvj444p): Converted to jpg but dpi is changed from 300 to 96.įfmpeg y -i test.tif -r 1 -q:v test.jpg (tried various range: 1 to 10): Same problem.It seems like only extension is changed to jpg. ffmpeg -y -i test.tif -c:v copy test.jpg: Converted to jpg with 300 dpi but actual file format is still tif.(Verified by pressing Right click on image -> properties-> details tab -> horizontal and vertical resolution attributes) ffmpeg -y -i test.tif test.jpg: Successfully converted to jpg but DPI has reduced from 300 to 96.I am new to FFMPEG and tried following failed attempts to achieve this:
We are using FFMPEG in our java application and I am trying to convert a tiff file to jpg but the requirement is to keep the SAME DPI as it has in original tiff file.