Announcement

Collapse
No announcement yet.

Bulk export tile image/why does cropping increase size?

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

    Bulk export tile image/why does cropping increase size?

    Hi all,

    Brand new Irfanview user here. I have TIFF files that I would like to split into even parts (keeping TIFF format), which is what led me to Irfanview's "Export tile image" function. I would like to know if it's possible to perform this exact function in bulk. Looking through the guide for command line options (http://www.etcwiki.org/wiki/IrfanVie...d_Line_Options) I cannot see any option to call the export tile image function.

    I tried using the bulk crop and rename tool, and while this works nicely, the exported TIFF files are much larger than the imported TIFF files. For example: using "export tile image", a 42mb file split into 2 columns and 1 row would end up with two 21mb files - this is ideal. Using bulk crop, however, results in each crop being around 80mb, and therefore almost quadrupling the size of TIFFs. I am not specifying any additional processing (e.g. color, contrast) between the import and export TIFFs, and so I cannot work out how that can be the case.

    Is anyone able to offer help, either with a method to bulk export tiles from images, or to bulk crop and rename without changing the total size of the file on disk?

    Thanks,
    Paul

    #2
    Check your compression options. The difference in file size is most likely due to not using the same compression method as used by the original.

    I don't see any option for doing this as a batch process.
    Last edited by Bhikkhu Pesala; 05.12.2017, 08:02 PM.
    Before you post ... Edit your profile • IrfanView 4.67 • Windows 10 Home 19045.2486

    Irfan PaintIrfan View HelpIrfanPaint HelpMore SkinsFastStone CaptureUploads

    Comment


      #3
      Originally posted by Bhikkhu Pesala View Post
      Check your compression options. The difference in file size is most likely due to not using the same compression method as used by the original.
      I just checked and I have it set to Compression: "None" on the options for output.

      Originally posted by Bhikkhu Pesala View Post
      I don't see any option for doing this as a batch process.
      I figured that might be the case. Is there a possibility it could be implemented? Having the same output as input file size using batch crop would be fine if possible though.

      Thanks for your quick response.

      Comment


        #4
        Originally posted by PaulSutherland View Post
        I just checked and I have it set to Compression: "None" on the options for output.
        So, change it to LZW or Zip to reduce the file size. JPG will also reduce the quality.

        PNG can also be used for lossless compression, and it may be smaller than TIF.

        You could run four batch operations on the original TIF images to crop to a different quadrant on each run. A plain crop can be run from a command line.
        Last edited by Bhikkhu Pesala; 05.12.2017, 11:20 PM.
        Before you post ... Edit your profile • IrfanView 4.67 • Windows 10 Home 19045.2486

        Irfan PaintIrfan View HelpIrfanPaint HelpMore SkinsFastStone CaptureUploads

        Comment


          #5
          Thanks. I will test those out tomorrow at work but I am curious to know if there is a crop option that doesn't compress from the original or add anything else in. We need as high a quality as possible and it seems odd that the files increase in size. I don't know much about compression though I'll admit. Is LZW lossless? We can't zip them just yet.

          It seems like tile option keeps the image identical except for dimensions, and I'd like crop to do the same.

          Regarding running several batch operations, yes, that's what I'd do. It works great, I just need nothing to happen to the size ideally.

          Comment


            #6
            If the size increases then the original is compressed, but the cropped version is not.

            Originally posted by Wikipedia
            Lempel–Ziv–Welch (LZW) is a universal lossless data compression algorithm created by Abraham Lempel, Jacob Ziv, and Terry Welch. It was published by Welch in 1984 as an improved implementation of the LZ78 algorithm published by Lempel and Ziv in 1978.
            Zip compression is also lossless. The compression is done when saving the data in the TIF file to a TIF file. It is not the same as zipping the TIF file.

            Click image for larger version

Name:	TIF Compression Options.png
Views:	1
Size:	5.6 KB
ID:	83001

            The results will vary depending on the image data, but here is a comparison of different compression methods used on the same image. All but the JPG image and TIF with JPG Compression are lossless.

            Click image for larger version

Name:	TIF Compression.png
Views:	1
Size:	15.8 KB
ID:	83000

            Note that the PNG image has the smallest file size among the lossless methods. The 24-bit image has 30,849 unique colours
            Last edited by Bhikkhu Pesala; 06.12.2017, 09:53 AM.
            Before you post ... Edit your profile • IrfanView 4.67 • Windows 10 Home 19045.2486

            Irfan PaintIrfan View HelpIrfanPaint HelpMore SkinsFastStone CaptureUploads

            Comment


              #7
              Thanks! That's really helpful.

              I just re-tested the "none" compression option on scans I recently made, and unlike what I encountered before, file size does not change at all, as desired. I am confused as to what can have happened before. I changed none of the options from yesterday. I guess that's my problem solved. Thank you for your help.

              If it's ever in the pipeline to have a batch option for "Export image tiles", that would be fantastic. I can make my own thread in that section of the forum if that's convenient.

              Comment

              Working...
              X