0

I have been working on an image from last 25 days with zero output. So I came here in search of an answer.

I have a jpg image of 7MB. I upload it in Photoshop and changed the width to 96 Inch, Resolution for 300 pixels/inch, checked resample option and selected Preserve Details 2.0 and reduce noise to 100%. It gave me a 1.5 GB image as output.

Now I tried the same steps in image magic

gm convert -scale 768 -units PixelsPerInch -density 300x300 -resample 300x300 -noise 100% image.jpg -resize 768 image.tiff

Above command gave output in KBs. I need help. enter image description here enter image description here

  • Remove the `-scale`, `-resample`, and `-resize` options. Does that give you results closer to what your expecting? Although your setting the resolution correctly, your throwing out image data by mixing those options. – emcconville Oct 12 '18 at 13:34
  • @emcconville No, it does not get closer output, If I remove it I an image around 30-60MB for different input. According to my understanding -resample [link](https://imagemagick.org/script/command-line-options.php#resample) is used to change the resolution of the image. And I definitely need -resize. – Thomsheer Ahamed Oct 13 '18 at 05:29

1 Answers1

1

If you want a 96inch wide image at 300dpi, you will need a width of 28,800 pixels, so start with:

gm convert input.jpg -resize 28800x result.jpg

That will resize the image to the correct width and do whatever is required with the height to preserve the image's aspect ratio - i.e. without distorting it.

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432