Results 1 to 4 of 4

Thread: batch conversion w/ [multi-conversion settings that changes depending on the file]?

  1. #1

    Default batch conversion w/ [multi-conversion settings that changes depending on the file]?

    Sorry if I post this on the wrong thread

    example: if the picture's dimension is width>height{1400x1100} it will be resize with a [0,700] setting while a dimension that has a height>width{800x1200} it will be resize with a [700,0] setting with a jpg quality of 70~75.
    I want to resize the image lowest dimension to 700
    if the lowest is height,height is 700,
    if the width is the lowest, the width is 700 in resize. while keeping aspect ratio

    I've tried setting the resize to [700,700] but it didn't work, this only sets the highest dimension to 700 ignoring the other limit

    while searching the web for other solutions i found the command lines so i thought it might be possible to do something like this using command lines

    scan [current image to convert] gets the value of height and width of file
    if the [current image to convert] has its width>height, go to convert with settings of resize [0,700]
    if the [current image to convert] has its height>width, go to convert with settings of resize [700,0]
    else {would probably mean the picture is square} go to convert with settings of resize [700,0] or [0,700] it's probably the same right?
    then after converting the current image to go next image and repeat until no image is left
    btw includes subdirs,doesn't change the name and overwrites the original files, jpg quality of 70~75 and keeping the aspect ratio

    why do i want this troublesome way of converting?
    simple because i tried converting only with resize[700,0 or 0,700] some images with 2000x6000 or 6000x2000
    images with 2000x6000 became 234x700 with the [0,700] it was so blurry compared to the 700x2100 with [700,0] which was nice

    Pls don't tell me to organize the image base on its dimension before converting them cause that would be more troublesome
    because of this reasons
    1. there are more than 450,000 images (And No not that kind of images, normal ones and manga)
    2. the images are in order to date and other reasons
    3. rather than looking for and deleting images that I don't need I'd rather convert them to a smaller file size to save space

    I only know basics in programming so i don't know to make this btw how are command lines made are they a bat file? ini file? or a script?
    even if its just the way to create a simple command line file could you pls help me even w/o the program mentioned earlier
    Last edited by risuki200; 07.01.2017 at 03:21 PM.

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

    Default

    Just use the Batch conversion option from File menu and select "Set short side to.." 700.
    See example below.
    Attachment 4590

  3. #3

    Default

    Thank You
    I thought that short was width and long was height
    Thank You again for helping me

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

    Default

    Yes, I have always thought it would be clearer if it said "shorter side" and "longer side".

    There is probably a limit on how many file names at a time the Batch conversion dialog can handle. If there is I am sure that 450,000 would be over the top. You do have the alternative to write a script file that includes a Command line to launch Irfanview with the /advancedbatch option. You can then do all the file handling and naming from the script file while leaving Irfanview to do the cropping you want. That way you could probably set it going as a background task to gradually work its way through all the files you have. If you want further help on that then this is the right area of the forum to ask.

    You could use a .bat (or .cmd) file from the Control panel or direct from cmd.exe . You could also run other script files under WScript.exe which is included in all Windows versions up to Win10. There are many script types that run under Wscript.exe. I use Visual Basic scripts although others here will tell you that AutoIt and AutoHotkey are the way to go. PowerShell is the new kid on the block but you would probably have to seek help outside this forum if you wanted to use that.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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