Export all pages from a Multi-page TIFF

Older bugs which are supposed to be fixed in 0.84. *** Please try to reproduce your bug and confirm the bug fix. ***

Moderator: Dreamer

corr
Posts: 26
Joined: Tue Jun 13, 2017 8:00 am

Re: Export all pages from a Multi-page TIFF

Post by corr »

Using one core solved my problem 👍

Thank you.

Is there a way to extract these pages without recompressing (lossless)?
User avatar
xnview
Author of XnView
Posts: 36431
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Export all pages from a Multi-page TIFF

Post by xnview »

corr wrote: Thu Jul 01, 2021 4:50 pm Is there a way to extract these pages without recompressing (lossless)?
Currently not
Pierre.
cday
XnThusiast
Posts: 3084
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Export all pages from a Multi-page TIFF

Post by cday »

xnview wrote: Fri Jul 02, 2021 6:41 am
corr wrote: Thu Jul 01, 2021 4:50 pm Is there a way to extract these pages without recompressing (lossless)?
Currently not
@corr:

Which compression option are you using?

Most or all of the compression options for TIFF files are lossless except for the JPEG option...

For JPEG compression, selecting 'Use estimated quality (when possible)' should minimise loss, which in any case in most circumstances is not the issue many users expect.
corr
Posts: 26
Joined: Tue Jun 13, 2017 8:00 am

Re: Export all pages from a Multi-page TIFF

Post by corr »

Yes, lossless but not without *recompression*. I can only decide between much bigger files (lossless format) or decreasing quality (recompress again with lossy jpeg).

My multipage file is having grayscale and color pages. Last ones seem to be compressed with jpeg.
cday
XnThusiast
Posts: 3084
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Export all pages from a Multi-page TIFF

Post by cday »

corr wrote: Fri Jul 02, 2021 7:31 am Yes, lossless but not without *recompression*.
A file recompressed using a lossless compression method should have identical quality to the original file... :D

I can only decide between much bigger files (lossless format) or decreasing quality (recompress again with lossy jpeg).

My multipage file is having grayscale and color pages. Last ones seem to be compressed with jpeg.
For colour and grayscale images, when file size is a significant consideration JPEG compression is usually the only practical option.

But can you really see any difference between the original and the output files? In most situations recompressing once or twice, or even rather more times, is unlikely to produce any noticeable loss. For optimum maintenance of quality there are other JPEG saving options, such as the subsampling option used, which should probably be considered, but I can't advice on those.

You might take a look at this post from this long thread Basic understanding of "JPEG Quality"?, which discusses JPEG quality in some detail.

If an image has been edited it must be resaved or the changes will be lost, if an image hasn't been edited why resave it?
corr
Posts: 26
Joined: Tue Jun 13, 2017 8:00 am

Re: Export all pages from a Multi-page TIFF

Post by corr »

The image has not been edited, only the container has been changed, from a multi-page TIFF to a single-page TIFF. So I can't see why you have to recompress the image right away.

If you recompress a jpeg without changing the content, you have to guess what compression rate the source used. If it is too high, it is a waste of space, if it is too low, the quality drops. So recompression is the last thing I want if I'm not editing the content of the image. It's like recompressing a video completely just because you want to switch from avi to a mkv container. At least, that's not how I do it. It saves resources and maintains quality.

Just my humble opinion :wink:
User avatar
XnTriq
Moderator & Librarian
Posts: 5920
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Export all pages from a Multi-page TIFF

Post by XnTriq »

corr wrote: Fri Jul 02, 2021 7:31 amYes, lossless but not without *recompression*. I can only decide between much bigger files (lossless format) or decreasing quality (recompress again with lossy jpeg).

My multipage file is having grayscale and color pages. Last ones seem to be compressed with jpeg.
I don't have a solution, but maybe this info is of interest to you:
corr
Posts: 26
Joined: Tue Jun 13, 2017 8:00 am

Re: Export all pages from a Multi-page TIFF

Post by corr »

Ah nice. Thank you 😘
User avatar
XnTriq
Moderator & Librarian
Posts: 5920
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Export all pages from a Multi-page TIFF

Post by XnTriq »

As it turns out, TiffToy can split multi-page TIFF files witout re-encoding each page (confirmed by Compare It! and AsTiffTagViewer).
https://www.leadtools.com/support/forum/posts/t10960-Sample-File--LZW-compressed-multi-page-TIFF#post41249 wrote:The attached TIFF file contains 11 pages, each of which is encoded differently from all the other pages. The pages are, in order:
1- Uncompressed RGB
2- Uncompressed CMYK
3- JPEG 2000 compression
4- JPEG 4:1:1 compression
5- JBIG compression
6- RLE Packbits compression
7- CMYK with RLE Packbits compression
8- YCC with RLE Packbits compression
9- LZW compression
10- CCITT Group 4 compression
11- CCITT Group 3 2-D compression
TiffToy Dump of MultipleFormats.tif wrote:

Code: Select all

Page 1 TIFF Directory at offset 0x8
  Subfile Type: multi-page document (2 = 0x2)
  Image Width: 600 Image Length: 75
  Resolution: 150, 150 pixels/inch
  Bits/Sample: 1
  Compression Scheme: None
  Photometric Interpretation: min-is-black
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 75
  Planar Configuration: single image plane
  Page Number: 0-0
Page 1 TIFF Directory at offset 0x16d8
  Subfile Type: multi-page document (2 = 0x2)
  Image Width: 600 Image Length: 75
  Resolution: 150, 150 pixels/inch
  Bits/Sample: 8
  Compression Scheme: None
  Photometric Interpretation: separated
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 4
  Rows/Strip: 75
  Planar Configuration: single image plane
  Page Number: 1-0
Page 2 TIFF Directory at offset 0x2d6d6
  Subfile Type: multi-page document (2 = 0x2)
  Image Width: 600 Image Length: 75
  Resolution: 150, 150 pixels/inch
  Bits/Sample: 8
  Compression Scheme: 34712 (0x8798)
  Photometric Interpretation: RGB color
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 3
  Rows/Strip: 75
  Planar Configuration: single image plane
  Page Number: 2-0
Page 3 TIFF Directory at offset 0x2f8ee
  Subfile Type: multi-page document (2 = 0x2)
  Image Width: 600 Image Length: 75
  Resolution: 150, 150 pixels/inch
  Bits/Sample: 8
  Compression Scheme: JPEG
  Photometric Interpretation: YCbCr
  YCbCr Subsampling: 2, 2
  YCbCr Positioning: cosited
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 3
  Rows/Strip: 75
  Planar Configuration: single image plane
  Page Number: 3-0
  Reference Black/White:
     0:     0   255
     1:   128   255
     2:   128   255
  Tag 512: 1
  Tag 513: 195150
  Tag 514: 9399
  Tag 515: 0
Page 4 TIFF Directory at offset 0x31f06
  Subfile Type: multi-page document (2 = 0x2)
  Image Width: 600 Image Length: 75
  Resolution: 150, 150 pixels/inch
  Bits/Sample: 1
  Compression Scheme: ISO JBIG
  Photometric Interpretation: min-is-black
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 75
  Planar Configuration: single image plane
  Page Number: 4-0
Page 5 TIFF Directory at offset 0x32114
  Subfile Type: multi-page document (2 = 0x2)
  Image Width: 600 Image Length: 75
  Resolution: 150, 150 pixels/inch
  Bits/Sample: 8
  Compression Scheme: PackBits
  Photometric Interpretation: RGB color
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 3
  Rows/Strip: 75
  Planar Configuration: single image plane
  Page Number: 5-0
Page 6 TIFF Directory at offset 0x331e8
  Subfile Type: multi-page document (2 = 0x2)
  Image Width: 600 Image Length: 75
  Resolution: 150, 150 pixels/inch
  Bits/Sample: 8
  Compression Scheme: PackBits
  Photometric Interpretation: separated
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 4
  Rows/Strip: 75
  Planar Configuration: single image plane
  Page Number: 6-0
Page 7 TIFF Directory at offset 0x5f1e6
  Subfile Type: multi-page document (2 = 0x2)
  Image Width: 600 Image Length: 75
  Resolution: 150, 150 pixels/inch
  Bits/Sample: 8
  Compression Scheme: PackBits
  Photometric Interpretation: YCbCr
  YCbCr Subsampling: 2, 1
  YCbCr Positioning: cosited
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 3
  Rows/Strip: 75
  Planar Configuration: single image plane
  Page Number: 7-0
  Reference Black/White:
     0:     0   255
     1:   128   255
     2:   128   255
Page 8 TIFF Directory at offset 0x75594
  Subfile Type: multi-page document (2 = 0x2)
  Image Width: 600 Image Length: 75
  Resolution: 150, 150 pixels/inch
  Bits/Sample: 1
  Compression Scheme: LZW
  Photometric Interpretation: min-is-black
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 75
  Planar Configuration: single image plane
  Page Number: 8-0
Page 9 TIFF Directory at offset 0x758ea
  Subfile Type: multi-page document (2 = 0x2)
  Image Width: 600 Image Length: 75
  Resolution: 150, 150 pixels/inch
  Bits/Sample: 1
  Compression Scheme: CCITT Group 4
  Photometric Interpretation: min-is-white
  FillOrder: msb-to-lsb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 75
  Planar Configuration: single image plane
  Page Number: 9-0
  Group 4 Options: (0 = 0x0)
Page 10 TIFF Directory at offset 0x75b78
  Subfile Type: multi-page document (2 = 0x2)
  Image Width: 600 Image Length: 75
  Resolution: 150, 150 pixels/inch
  Bits/Sample: 1
  Compression Scheme: CCITT Group 3
  Photometric Interpretation: min-is-white
  FillOrder: msb-to-lsb
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 75
  Planar Configuration: single image plane
  Page Number: 10-0
  Group 3 Options: 2-d encoding+EOL padding (5 = 0x5)
You do not have the required permissions to view the files attached to this post.
User avatar
xnview
Author of XnView
Posts: 36431
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Export all pages from a Multi-page TIFF

Post by xnview »

This problem is supposed to be fixed in XnView MP 0.99.0. Please check and confirm the bug fix here.
Pierre.