[SOLVED]file size for meeting its length in centimetres

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
manit
Posts: 123
Joined: 2009-01-30T22:31:26-07:00

[SOLVED]file size for meeting its length in centimetres

Post by manit »

i have to upload photograph on website which asks for picture size 3.5cmx4.5cm & file size in range 25kb-110kb
firstly how can i find out length of my imagefile ?
Currently I am using paintbrush in windows using which I resized picture to given centimetres but file size was just 10kb .
i already know that 'strip' , 'quality' option helps to reduce jpg size .
Last edited by manit on 2014-03-27T21:55:45-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: increasing file size for meeting its length in centimetr

Post by fmw42 »

You can create any size jpg you want in terms of file size within limits by using the -size (for width x height) -quality (for compression). You can then set the resolution in inches or centimeters by using the -units and -density arguments. It will not change the file size.

I would recommend that you make the width and height as large as possible (maintaining the aspect ratio specified by the cm x cm ) with the least amount of compression ( say -quality 75 or higher) to match your file size restriction. Then just set the density and units to get the resolution to match your cm requirement

see
http://www.imagemagick.org/script/comma ... .php#units
http://www.imagemagick.org/script/comma ... hp#density
http://www.imagemagick.org/script/comma ... hp#quality
manit
Posts: 123
Joined: 2009-01-30T22:31:26-07:00

Re: increasing file size for meeting its length in centimetr

Post by manit »

That helped.
Thank You.
sorry for my late reply.
Post Reply