Hello,
is it possible to resize an image, if i only have the size in inches or centimetres?
Regards
sashs
ImageMagick inches cm
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: ImageMagick inches cm
As far as I know, IM has no options to directly resize in inches or centimetres. You need to do the calculations in a script.
snibgo's IM pages: im.snibgo.com
Re: ImageMagick inches cm
Thanx.
My knowing about graphic processing is not good. Could you give me a little example for this?
Regards
sashs
My knowing about graphic processing is not good. Could you give me a little example for this?
Regards
sashs
Re: ImageMagick inches cm
How are you running the IM commands ? Linux, Windows, php etc.
Re: ImageMagick inches cm
I run IM on Windows. I do all with Java, but with system-commands (command-line).
Regards
sashs
EDIT: I don't use JMagick.
Regards
sashs
EDIT: I don't use JMagick.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: ImageMagick inches cm
set INFILE=liquid.jpg
set OUTFILE=liquid_resized.jpg
set MAX_HEIGHT_INCHES=3
set MAX_WIDTH_INCHES=5
FOR /F "usebackq" %%i IN (`identify -format "MAX_WIDTH_PIXELS=%%[fx:resolution.x*%MAX_WIDTH_INCHES%]\nMAX_HEIGHT_PIXELS=%%[fx:resolution.y*%MAX_HEIGHT_INCHES%]" %INFILE%`) DO @set %%i
convert %INFILE% -resize %MAX_WIDTH_PIXELS%x%MAX_HEIGHT_PIXELS% %OUTFILE%
set OUTFILE=liquid_resized.jpg
set MAX_HEIGHT_INCHES=3
set MAX_WIDTH_INCHES=5
FOR /F "usebackq" %%i IN (`identify -format "MAX_WIDTH_PIXELS=%%[fx:resolution.x*%MAX_WIDTH_INCHES%]\nMAX_HEIGHT_PIXELS=%%[fx:resolution.y*%MAX_HEIGHT_INCHES%]" %INFILE%`) DO @set %%i
convert %INFILE% -resize %MAX_WIDTH_PIXELS%x%MAX_HEIGHT_PIXELS% %OUTFILE%
snibgo's IM pages: im.snibgo.com
Re: ImageMagick inches cm
Thanx. It was very helpful.
Regards
sashs
Regards
sashs