Announcement

Collapse
No announcement yet.

/multitif compiling images out of order

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

    /multitif compiling images out of order

    Hi!

    I have a folder with 50000 images. These are tif images with documents of varying pages needing to be merged together as a multipage tif image based on their common name. For example:
    D001111.001
    D001111.002
    D001111.003
    D001111.004
    D001112.001
    D001112.002
    D001113.001
    D001113.002
    D001113.003
    D001113.004
    D001113.005


    I need to compile into multipage tifs as:
    D001111.tif (4 pages)
    D001112.tif (2 pages)
    D001113.tif (5 pages)

    I've tried:
    Code:
    "c:\program files (x86)\Irfanview\i_view32.exe" /multitif=(b:\MergedImages\D001111.tif,b:\SingleImages\D001111 .*) /tifc=4 /killmesoftly /silent
    "c:\program files (x86)\Irfanview\i_view32.exe" /multitif=(b:\MergedImages\D001112.tif,b:\SingleImages\D001112 .*) /tifc=4 /killmesoftly /silent?
    "c:\program files (x86)\Irfanview\i_view32.exe" /multitif=(b:\MergedImages\D001113.tif,b:\SingleImages\D001113 .*) /tifc=4 /killmesoftly /silent?
    ?
    Some of my documents are over 1000 pages so I can't do the D001111.001, D001111.002, D001111.003, etc list (also, I don't know the number of pages for each "document")

    My resulting multipage tifs contain the correct number of images, but they are all out of order and not in the .001, .002, .003 order of the filenames.

    Any idea how I can do this with the images in order?

    #2
    I notice you have a space in:

    SingleImages\D001111 .*

    for example. I don't think you should have a space there.

    Comment


      #3
      Good catch! Although, just a type-o in my example. In my real script I do not have a space and the resulting images are still out of order.

      Comment


        #4
        I noticed the following format for multitif in Help/Command Line Options:

        i_view32.exe /multitif=(c:\test.tif,filelist=c:\mypics.txt)

        I assume you are using Windows. If you are familiar with Cygwin this would probably be easier. However, if:

        DIR /B D001111.*

        produces a list of files in the right order:

        DIR /B D001111.* >list.txt

        would create a file (list.txt) that could be used as follows:

        DIR /B D001111.* >list.txt
        "c:\program files (x86)\Irfanview\i_view32.exe" /multitif=(b:\MergedImages\D001111.tif,filelist=C:\ list.txt) /tifc=4 /killmesoftly /silent

        A for loop should be able to run this for all the TIFs.
        Last edited by IrfanUserGuyxyx; 21.08.2023, 08:57 PM.

        Comment


          #5
          Thanks IrfnaUserGuyxzy - I looked at that "list.txt" option. However, I'm going to end up with about 15,000 unique docs. Do I need to create 15,000 unique .txt files for each document?

          Comment


            #6
            If you start with a single list of the 15000 final image names, a script can run the two commands I suggested for each name and reuse the list.txt each time.

            Comment

            Working...
            X