For some unknown reason, I cannot change the density of GIF and HEIC images.
# Works for PNG, JPEG and TIFF, but doesn't work for GIF and HEIC
magick input.png -units pixelsperinch -density 300 output.png
# Doesn't work. The density of the output images is 72 PPI
magick input.gif -units pixelsperinch -density 300 output.gif
magick input.heic -units pixelsperinch -density 300 output.heic
Well, GIF, as far as I know, don’t support density, that is, PPI/DPI, and so I’m not really sure whether the command above should work for GIF files. But HEIC files, I’m sure (but I don’t have any real evidences), do support density. But then why the command above don’t change it?
The files are here: https://github.com/jsx97/test/blob/main/heic-gif-issue.zip
magick identify -verbose output.heic
:
Image:
Filename: output.heic
Permissions: rw-r--r--
Format: HEIC (High Efficiency Image Format)
Mime type: image/heic
Class: DirectClass
Geometry: 2550x3300+0+0
Units: Undefined
Colorspace: sRGB
Type: Grayscale
Base type: Undefined
Endianness: Undefined
Depth: 8-bit
Channels: 3.0
...
magick -version
: ImageMagick 7.1.1-32 Q16-HDRI aarch64 22207