Announcement

Collapse
No announcement yet.

Split multipage tiff into smaller size using page append, but keep compression.

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

    Split multipage tiff into smaller size using page append, but keep compression.

    I am trying to split a very large multi-page tiff file into smaller files of a set size by looping through a process that uses the /append option to add a page one at a time to the file and check its size. I have it working fine when the tiff file contains bitonal pages saved with G4 Compression, as it is using the settings in the ini file. The problem is I now need to adapt it to handle tiff files containing 8 bit greyscale images saved with JPG compression. If I run it currently, it converts the pages to bitonal with G4 compression. Is there a way to add options to the command line to force it to keep the 8 bit greyscale JPG images as they are and just append it? I tried adding switches to the command line to force tiff/jpg and 8BPP, but they are just ignored. I also tried deleting the ini file in the irfanview directory, but then the output files end up with no compression at all. I also tried changing the TIFF section of the ini file to specify Save Compression=6, but that converts the files to 24bpp jpg images and increases the file size by 50%. Below is a sample of the command my program is using and a little of the logic.

    C:\Program Files\Irfanview\i_view32.exe c:\temp\origfile.tif /page=1 /silent /killmesoftly /append=origfile_001.tif
    Check Size
    C:\Program Files\Irfanview\i_view32.exe c:\temp\origfile.tif /page=2 /silent /killmesoftly /append=origfile_001.tif
    Check size
    And so on till the size limit is reached at which time the destination file counter is incremented by one and a new file started.
    C:\Program Files\Irfanview\i_view32.exe c:\temp\origfile.tif /page=23 /silent /killmesoftly /append=origfile_002.tif

    So how do I change the options in the ini file or add the switches to the append command line to make this work?

    Thanks for the help!

    #2
    After communicating with Irfan on this issue, saving to tif with jpg compression forces any image to 24bpp mode.

    Comment

    Working...
    X