Results 1 to 4 of 4

Thread: . how crop many images by PERCENTAGE

  1. #1

    Default . how crop many images by PERCENTAGE

    Hi

    Got a folder of PNG images,
    of arbitrary dimensions.

    Would like to extract the *center*
    10% by 10%
    of each image.

  2. #2
    Moderator Enterprise User Bhikkhu Pesala's Avatar
    Join Date
    May 2007
    Location
    East London
    Posts
    6,219
    OS
    64-bit Win 10
    CPU Cores
    1

    Default

    Not possible AFAIK. You would have to resize them all first to the same size, then crop them by pixels. In the latest version you can set the order of these operations in the batch dialogue.

    http://www.softerviews.org/Batch.html

  3. #3

    Default

    Thanks ! Moderator.

    Leaves me no choice but go back to complex, but more versatile, ImageMagick

    where the mogrify component does a whole folder of PNGs
    & converts it to, say JPGs
    more or less as follows:

    mogrify ... -shave 45%x45% -format jpg ....

    moreover
    with a bit more incanting
    you can resize-up the little JPGs
    etc
    etc

  4. #4
    Professional User Mij's Avatar
    Join Date
    Mar 2007
    Location
    Camberley, Surrey, UK
    Posts
    2,763
    Version
    IrfanView 4.51
    OS
    32-bit Win 10
    CPU Cores
    3

    Default

    I agree that there is no easy way to do it in Irfanview. You can crop a fixed size area from the center of the images using the Add canvas feature, method 2, but you cannot do a fixed percentage.

    The only way I can see would be to use a script file. For each of the images it would need to read the image dimensions by using a command line with the /info=txtfile option, extract the image dimensions and calculate from them the required crop parameters x,y,w,h to use in a command line containing the /crop=(x,y,w,h) option. I doubt if that is any easier than using ImageMagick though.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •