Announcement

Collapse
No announcement yet.

. how crop many images by PERCENTAGE

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    . 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
    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.

    freeware, OpenType, DTP, font-editing, font manager, learning Pali, Character Map, Best Browsers, Screen Capture, Image Viewer, Stitch Panoramas, PDF Editor, PDF Viewer, Archiving, Create Fonts
    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

    Comment


      #3
      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

      Comment


        #4
        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.

        Comment

        Working...
        X