[magick-users] newbie: output to GIF/JPG file based on given size

Anthony Thyssen A.Thyssen at griffith.edu.au
Mon Nov 17 23:02:55 PST 2008


On Mon, 17 Nov 2008 21:41:00 -0800 (PST)
vuthecuong <vuthecuong at luvina.net> wrote:

| 
| suppose that I have a abc.JPG file with size is 1.8M.
| 
| which command of IM allow me to output abc.JPG file to a file that have
| smaller size? Let's say: 1.5M or 1.2M and so on.
| thanks and regards

The result depends on who you want to make it smaller.

By size (number of pixels),  by quality (-quality factor),
by compression (depending on the image format) and the image format
itself.

IM has no way of predicting how big a file will be except by actually
trying it.  No image problem can pre-determine this in any exact way
as there are just too many factors that need to be considered.

So basically if you want a particular size, then write a script to
adjust the factors you want to change so as to try and achieve the
result you want.



  Anthony Thyssen ( System Programmer )    <A.Thyssen at griffith.edu.au>
 -----------------------------------------------------------------------------
   ... money is like air and love, - unimportant if you've got
   enough of it, but desperately important if you haven't.
                             -- Terry Pratchett, ``Science of Diskworld''
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/


More information about the Magick-users mailing list