Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Compressed multi page tiff
#1
Hello,

I'm currently quite new to python but i'm finding my way pretty good and love the language more & more each day :)
but ... :) , i have currently an issue/problem where i can't find a decent solution for. I'm searching for a method to create a multipage tiff file from single page tiffs (which i found using PIL and the append_images method and which works fine) but the problem is that after creating that multipage tiff file the file size is drastically big (even too big tbh) that i would like to understand where this is coming from since the single images on themselves are quite small. The tiff single images have a jpeg compression and (as far as i can see using Preview on a mac) the multipage tiff also has this compression. I tried several methods (from the append_images/PIL method using their compression="jpeg" thing to using a conversion to a numpy array, ...) but nothing comes close to the actual result. Before i used python i've been using a toolkit called GDPicture and there the creation of the multipage tiff file (from the same source material) is going correct in terms of file size. But i need to have it in python so i'm desperately looking to find the solution :) I would like to add some of the single page tiffs but it is not allowed to attach them (so if you want/need them just give a shout on how i can deliver them).

Any help is much appreciated !
Thanks !
Reply
#2
I have not used the package below that I am recommending you take a look at, so can't say for sure it will be of help, but it has a method named tifftools.split which at least sounds promising, so worth your checking out:

package:
pypi: https://pypi.org/project/tifftools/
GitHub: https://github.com/DigitalSlideArchive/tifftools
Reply
#3
I don't know the answer, but if imagemagick can do it, one of the python wrappers such as wand should be able to do it as well.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  OCR-Python from Multi TIFF to HOCR getting only Data from 1st Page of multiple TIFF JOE 0 2,166 Feb-18-2022, 03:18 PM
Last Post: JOE
  how to extract tiff images from the subfolder into. hocr format in another similar su JOE 0 1,159 Feb-16-2022, 06:28 PM
Last Post: JOE
  How to open/load image .tiff files > 2 GB ? hobbyist 1 2,472 Aug-19-2021, 12:50 AM
Last Post: Larz60+
  Unable to capture all images of a multipage TIFF file in a merge bendersbender 0 2,222 Nov-19-2020, 03:09 PM
Last Post: bendersbender
  Not able to use boto library with compressed content in python3 avinash2020 1 1,895 Aug-13-2020, 09:24 PM
Last Post: avinash2020
  Converting PNG to TIFF (pillow?) gw1500se 4 5,528 Mar-25-2020, 06:29 PM
Last Post: gw1500se
  Tiff metadata sudecki 1 19,855 Aug-10-2018, 07:08 AM
Last Post: sudecki
  Pigz inside python - Reading compressed .gz file much faster jsmith7279 6 8,645 Dec-29-2017, 07:34 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020