Page 1 of 1

How do I convert jpg image to tiff with 300DPI and reduce noise to 100%?

Posted: 2018-10-12T06:06:31-07:00
by ahmedtamseer
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 conver -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.

Re: How do I convert jpg image to tiff with 300DPI and reduce noise to 100%?

Posted: 2018-10-12T06:29:03-07:00
by snibgo
"gm" is GraphicsMagick, not ImageMagick. They are different systems.

ImageMagick ("IM") mostly works in pixels, not inches. What are your input dimensions in pixels? What dimensions do you want for the output?

Re: How do I convert jpg image to tiff with 300DPI and reduce noise to 100%?

Posted: 2018-10-12T23:12:32-07:00
by ahmedtamseer
Sorry, My bad.

Thank you for your info on pixels. I found a way to tackle it. inches * DPI = pixels; ie 96 * 300 = 28800

I have an image, let say of 5059x3360 in pixels. I actually want to resize it to user entered dimension. let us consider it be 2400 (pixels) width by maintaining the aspect ratio of the image.

Is there any way to covert it using "convert" of ImageMagick.

Re: How do I convert jpg image to tiff with 300DPI and reduce noise to 100%?

Posted: 2018-10-13T03:38:04-07:00
by snibgo

Code: Select all

convert in.png -resize 2400x out.png
Notice the order: read the image, process it, and write it.

The "-resize" includes the width but not the height, so it will make the width 2400 while keeping the aspect ratio.

See http://www.imagemagick.org/script/comma ... php#resize

Re: How do I convert jpg image to tiff with 300DPI and reduce noise to 100%?

Posted: 2018-10-15T22:25:23-07:00
by ahmedtamseer
Will "widthx" work? Because I can not see it here in the link below.

https://www.imagemagick.org/script/comm ... p#geometry

Anyways I removed gm and ran the original command. I got approximate outside. I still wonder why it didn't work with the combination of graphicMagic.

Re: How do I convert jpg image to tiff with 300DPI and reduce noise to 100%?

Posted: 2018-10-15T23:22:04-07:00
by fmw42
Why do you need to resample the image (-resize or -scale)? Why not just change the density so that it prints to the desired print size.

You would only need to resize if you desire a smaller file size.

Code: Select all

convert image -units pixelsperinch -density XX result
Where you compute the density give the pixels dimensions so that the pixel dimension/density = print size

or

dimension/printsize = density

Re: How do I convert jpg image to tiff with 300DPI and reduce noise to 100%?

Posted: 2018-10-15T23:48:11-07:00
by ahmedtamseer
I want to convert an image to 300DPI so I used -resample. When I used -resample without using -density it threw an error, saying (somewhat like) "Image does not contain resolution".

If a run below code
convert input.jpeg -units pixels-grinch -density 300x300 output.tiff

I got below error
convert: unrecognized units type `pixels-grinch' @ error/convert.c/ConvertImageCommand/3147.

Re: How do I convert jpg image to tiff with 300DPI and reduce noise to 100%?

Posted: 2018-10-16T09:24:09-07:00
by fmw42
It is properly -units pixelsperinch. Sorry my automatic spell corrector change what I typed and I did not notice it.