NiTiN
NiTiN

Reputation: 81

What are some examples of imagemagick commands where option can be provided between magick and input filename

For e.g.

magick -density 100 apple.jpg -resize 100x100 apple-edited.jpg

Density here is the option which has to be provided prior to input file name. Can someone please explain when is such prior options are needed. And also provide me few more examples.

PS: I tried looking for the options but not sure if there is an specific term for such options which will help limit the search results.

Upvotes: 2

Views: 108

Answers (1)

Mark Setchell
Mark Setchell

Reputation: 208003

ImageMagick is, exclusively, a raster image processor, which means that it processes bitmap images made up of pixels laid out on a rectangular grid (or raster), rather than a vector image processor like Adobe Illustrator or Inkscape which deal with shapes, lines, rectangles and bezier curves described by their vertices or inflection points - not pixels.

When you load a vector image (e.g. an SVG image, or a PDF) into ImageMagick, the very first thing it does is rasterise your image onto a rectangular grid before it can work with the pixels. So, if your image is an SVG or a PDF, you need to set the density, or number of lines in the grid before you load the image.

I don't know of a reason to do that for a JPEG, like your example. I can't think of any other settings you absolutely need to make prior to loading an image.

Upvotes: 2

Related Questions