2

I have many pictures. I'm going to resize them all together from command line in feet, or if it's not possible in inches.

I know there are GUI apps that can do this but it works only one by one and it takes time to do this work!

I tried the Convert -resize command but it's only in pixel format and when I check in Inkscape that size is not what I want.

How can I do this?

Zanna
  • 70,465
Deniz
  • 721
  • Tried ImageMagick? Check this answer- http://askubuntu.com/a/135489/117406 , for help. – Andrew Nov 15 '15 at 07:38
  • yes I did...what I mean is convert pictures in foot or inch unit.. – Deniz Nov 15 '15 at 07:47
  • 1
    I am not sure if I get your question, but once you set your final measurements isn't it just a conversion away to pixels? – Andrew Nov 15 '15 at 07:53
  • Related: This post on Unix & Linux SE asked how to use imagemagick to convert images in mm (milimeter) unit and the answer pointed to do conversion from mm to pixel according to DPI requirement. This might be applicable for other units as well. –  Nov 15 '15 at 09:23

2 Answers2

2

Image files like jpeg or png store discrete pixels only. How long 10 pixels are is purely a matter of convention or use. If you diplay the pixels on an old 70 dpi monitor, 10 pixels are 1/7 inch. If you print the pixels on a high resolution 1200 dpi printer, the 10 pixels are a mere 1/120 inch long.

So before you can talk about resizing in terms of real world lengths like foot or meter, you need to fix (fake) a resolution.

Then there are still two ways to resize. Just pretend them to have a different resolution. Or have a program like ImageMagick compute a different number of pixels pretending they keep the resolution. In the end resizing always means to change the number of pixels, whether you do it explicitly or your display or print program does it under the hood to fit the original number of pixels into a given frame size.

Harald
  • 1,170
1

I got how to resize!

First check picture info:

$ identify -verbose file.jpg
Geometry:
Resolution:
Print Size (inch):
Geomtry=Print Size X Resolution

Then do

convert -resize XxY! file.jpg output.jpg
Zanna
  • 70,465
Deniz
  • 721
  • my problem is sometimes it doesnot show gemotry or it shows sometimes in centimeter...;( – Deniz Nov 16 '15 at 15:52
  • You should update your question, not add as an answer. Anyhow, there is a field, Units right below print, you can write a shell script to alter the calculations appropriately – Andrew Nov 16 '15 at 18:46