Hi guys,
Let me try and explain.
Using Imagemagick from the command line using PHP exec() functions to run a web app that can take a picture uploaded by users along with some text to annotate on the picture (sports cards for kids) that can then be printed for them to swap/collect etc.
As you can see I am dealing in 2 media - digital and print. aargghh.
I am trying to use IM to get the resolution set to a fixed limit (pref 150x150 dpi) and then -resize the image to get it to the correct dimensions. I am trying to handle all picture resolutions provided and funnel them into a fixed format of resolution and pixel size.
I have a few test images that I have created in Photoshop in 72dpi and 180 dpi. When I use -density the 72dpi will behave appropriately resolving up and down but the 180dpi image will not obey the commands and will continue to display at 180dpi.
Can anyone offer any suggestions?
The site is here: http://www.mysportscards.org for an explanation. I am still working on this on my development machine.
Also does IM automatically save images in 72dpi? If so, can I change this easily?
Please someone help me
Re: Please someone help me
Not 100% sure what you want but this will change the image dpi and resize it.
Code: Select all
convert input.jpg -density 150x150 -resize 300x300 output.jpg
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Please someone help me
Bonzo, I think you mean -resample 300x300
That resizes the image according to change density, and sets the density to that give, such that the real world size does not change.
-resize just changes the pixel size only
-set density 300x300 just assigns a new density to the image, without chnaging the images pixel size.
That resizes the image according to change density, and sets the density to that give, such that the real world size does not change.
-resize just changes the pixel size only
-set density 300x300 just assigns a new density to the image, without chnaging the images pixel size.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/