Also have a look at FIJI (FIJI Is Just ImageJ) as it's emminently scriptable, so I'm told...

On 14 May 2017 at 20:29, Ray via luv-main <> wrote:
On 14.05.2017 17:55, Mark Trickett via luv-main wrote:
Hello All,

I am wanting to cut the file size of photos from my phone. I have
tried opening in GIMP, but takes a bit of mousing and clicking around,
and even saving/exporting several times to get the size down. I think
the imagemagik suite should be able to do, but my reading of the man
pages does not make it apparent to me. They talk of resizing, but it
looks like the linear extent, rather than loosing some detail of the
same extent of image. I would appreciate any contributions.


Mark Trickett
luv-main mailing list

To scale an image in gimp load the image go to menu item "image>Scale Image"
type in size, press scale. Examine the result. To save use menu item "File>Export As..."
Close file, a box will come to save or discard file, press discard.

If only doing a small number of images (below say 20) I use this particularly if accurate size is important, say for desktop backgrounds..

On the command line when doing work on a lot of images consider the Netpbm tools, this is a large set of command line tools that will allow one to do almost ANYTHING with  images on the command line, For scaling images "pnmscale" does the job.....
Note: This is from an uptodate version of Netpbm, I believe the one in Debian is VERY old.

pnmscale(1)                          General Commands Manual                          pnmscale(1)

       pnmscale - scale a portable anymap

       pnmscale scale_factor [pnmfile]
       pnmscale -reduce reduction_factor [pnmfile]
       pnmscale  [{-xsize=cols  |  -width=cols  | -xscale=factor}] [{-ysize=rows | -height=rows |
       -yscale=factor}] [pnmfile]
       pnmscale -xysize cols rows [pnmfile]
       pnmscale -pixels n [pnmfile]

       Miscellaneous options:
       -verbose -nomix

   Minimum unique abbreviation of option is acceptable.  You may use double hypens instead of
   single  hyphen  to denote options.  You may use white space in place of the equals sign to
   separate an option name from its value.

   Reads a PBM, PGM, or PPM image as input, scales it by the specified factor or factors  and
   produces  a  PGM  or PPM image as output.  If the input file is in color (PPM), the output
   will be too, otherwise it will be grayscale (PGM).  This is true even if the  input  is  a
   black  and  white  bitmap  (PBM), because the process of scaling can turn a combination of
   black and white pixels into a gray pixel.

   If you want PBM output, use pgmtopbm to convert pnmscale's output to PBM.   Also  consider

   You can both enlarge (scale factor > 1) and reduce (scale factor < 1).

   When  you  specify  an  absolute size or scale factor for both dimensions, pnmscale scales
   each dimension independently without consideration of the aspect ratio.

   If you specify one dimension as a pixel size and don't specify the other  dimension,  pnm-
   scale scales the unspecified dimension to preserve the aspect ratio.

   If you specify one dimension as a scale factor and don't specify the other dimension, pnm-
   scale leaves the unspecified dimension unchanged from the input.

   If you specify the scale_factor parameter instead of dimension options, that is the  scale
   factor for both dimensions.  It is equivalent to -xscale=scale_factor -yscale=scale_factor

   Specifying the -reduce reduction_factor option is equivalent to specifying the  scale_fac-
   tor parameter, where scale_factor is the reciprocal of reduction_factor.

   -xysize  specifies  a  bounding  box.  pnmscale scales the input image to the largest size
   that fits within the box, while preserving its aspect ratio.

   -pixels specifies a maximum total number of output pixels.  pnmscale scales the image down
    to  that  number  of pixels.  If the input image is already no more than that many pixels,
    pnmscale just copies it as output; pnmscale does not scale up with -pixels.

       ............................ much text cut out..................

luv-main mailing list

Dr Paul van den Bergen