Changing resolution with -resample or -units density
Posted: 2017-03-31T05:16:12-07:00
Hello,
I have image with resolution 600x600 (inches) with image width 2899 and image lenght 2081. Because of the next processes, where the system accepts only image with resolution of 300x300 i have to resample the original image. I know i can do it with two commands:
convert -units PixelsPerInch image -density 300 resultimage
convert image -resample 300x300 resultimage
I understand the command with resample, the resulted image has resolution 300 and image width and length in pixels are half of the original image.
But i the first command i am not sure wht it does, it changes the resolution but the image width and lenght is the same, i am not sure how to undertand this, what it does with the image.
Which command should i use if the only thing i want to change is the resolution just to pass it through the system, otherwise i want the image to be unchanged, as original image.
I tried to google it, but cant understand it fully.
Edit: The density option, if i understand it well, is said just to change the value of the tag not the real resolution, so the resolution is still 600 while the image metadata says it is 300? So what is better? What preserve image in better quality?
I have image with resolution 600x600 (inches) with image width 2899 and image lenght 2081. Because of the next processes, where the system accepts only image with resolution of 300x300 i have to resample the original image. I know i can do it with two commands:
convert -units PixelsPerInch image -density 300 resultimage
convert image -resample 300x300 resultimage
I understand the command with resample, the resulted image has resolution 300 and image width and length in pixels are half of the original image.
But i the first command i am not sure wht it does, it changes the resolution but the image width and lenght is the same, i am not sure how to undertand this, what it does with the image.
Which command should i use if the only thing i want to change is the resolution just to pass it through the system, otherwise i want the image to be unchanged, as original image.
I tried to google it, but cant understand it fully.
Edit: The density option, if i understand it well, is said just to change the value of the tag not the real resolution, so the resolution is still 600 while the image metadata says it is 300? So what is better? What preserve image in better quality?