Announcement

Collapse
No announcement yet.

Batch auto crop borders of jpegs in present folders possible?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Solved Batch auto crop borders of jpegs in present folders possible?

    I'm trying to auto crop the borders of a large amount of ebook cover images from their present locations. Each book has one cover in the folder with it called cover.jpg .

    When I try and run the batch all seems to go OK, I get a list like this:

    Processing file: D:\U\Madeleine Urban\Sticks & Stones (225)\cover.jpg
    ... Ok - Warning: Destination file already exists -> Replace: D:\U\Madeleine Urban\cover.jpg

    Processing file: D:\U\Madeleine Urban\Warrior's Cross (226)\cover.jpg
    ... Ok - Warning: Destination file already exists -> Replace: D:\U\Madeleine Urban\cover.jpg
    But none of the images get cropped. I can auto crop the images one at a time but if I try and do them in bulk it doesn't work.

    I have the advanced settings set to auto crop borders and overwrite existing files.

    Can anyone please tell me if this is possible and if so what I am doing wrong?
    Thanks.

    #2
    Processing file: D:\U\Madeleine Urban\Sticks & Stones (225)\cover.jpg
    ... Ok - Warning: Destination file already exists -> Replace: D:\U\Madeleine Urban\cover.jpg

    Processing file: D:\U\Madeleine Urban\Warrior's Cross (226)\cover.jpg
    ... Ok - Warning: Destination file already exists -> Replace: D:\U\Madeleine Urban\cover.jpg
    It looks like you are replacing the same file over and over again.

    currently running 4.56 / 32 bit

    Comment


      #3
      Yeah, I noticed it was trying to write the new files all to the same location all with the same name.

      Every cover has the same name (cover.jpg) I need it to either replace them in the source folder (I know the risks & have backups) or create a replacement with a set name like newcover.jpg (in the source folder) that I can then mass rename back to cover.jpg

      I cant even get it to write them in the original folder with a different name. Irfanview wants to put them all together in the author folders (one below the book folders). The program has the option of replacing / overwriting the original file but I cannot get it to actually do it, every time I try it appears to have done it but nothing has actually been done. Oddly if I tick the box 'Delete the original file after conversion' it's quite happy to delete all my images and not replace them with anything!
      Last edited by Vortex; 17.08.2016, 05:47 PM.

      Comment


        #4
        First of all sort out the naming. If you want them all to be renamed newcover.jpg then you will need to enter new$N in the name box and $D in the Output directory box. Select Batch rename option and click on Run test rename to test that you have got it right (see attached image below).

        Click image for larger version

Name:	Run test rename.png
Views:	1
Size:	54.5 KB
ID:	81468

        Before you try to autocrop a jpeg image it is also worth checking that it will work. Autocrop will only remove the border if it is all exactly the same colour as the pixel at top left. So open one of your cover.jpg images in the browser window and give it a try. You may have to use the "Replace color" feature to make it all the same colour before Autocrop will work correctly.

        You can select "Replace color" as well as "Autocrop" in the Advanced options for a batch process but you will have to use "Custom processing order" to change the order of the operation so that Replace color comes before Autocrop.
        Last edited by Mij; 17.08.2016, 05:52 PM.

        Comment


          #5
          Aha! thank you Mij, that works perfectly.
          All the cover images have white borders so they crop very reliably, just couldn't figure out how to get it to put the new cropped images back in the original folders.
          Great program.

          Comment

          Working...
          X