Results 1 to 10 of 10

Thread: Split multipage tiff (jpg compressed) to single jpg or tiff files loseless

  1. #1
    Hobby User Sprintdriver's Avatar
    Join Date
    Aug 2006
    Location
    Norway
    Posts
    157
    OS
    32-bit Linux Distribution
    CPU Cores
    4

    Default Split multipage tiff (jpg compressed) to single jpg or tiff files loseless

    Hi.

    I have a scanner at work that spit out multipage tiff files that is jpg compressed.

    I do know I can do a batch convert and say I'll save all documents from multipage tiffs. However, that will cause the output files to be compressed to jpg once again.

    Is it possible to use IV to split a multipage tiff file - jpg compressed - into several single jpg or tiff images, without having to compress the images all over again?


    Thanks
    If it hurts not to drint, don't waste the bottle then.

  2. #2
    Moderator Enterprise User Bhikkhu Pesala's Avatar
    Join Date
    May 2007
    Location
    East London
    Posts
    6,166
    OS
    64-bit Win 10
    CPU Cores
    1

    Default

    Options, Multipage Images, Extract All pages, JPG Options, Try to save with original JPG quality

  3. #3
    Hobby User Sprintdriver's Avatar
    Join Date
    Aug 2006
    Location
    Norway
    Posts
    157
    OS
    32-bit Linux Distribution
    CPU Cores
    4

    Default

    Quote Originally Posted by Bhikkhu Pesala View Post
    Options, Multipage Images, Extract All pages, JPG Options, Try to save with original JPG quality
    Still, it doesn't offer loseless extraction of single pictures?
    If it hurts not to drint, don't waste the bottle then.

  4. #4
    Moderator Enterprise User Bhikkhu Pesala's Avatar
    Join Date
    May 2007
    Location
    East London
    Posts
    6,166
    OS
    64-bit Win 10
    CPU Cores
    1

    Default

    Quote Originally Posted by Sprintdriver View Post
    Still, it doesn't offer loseless extraction of single pictures?
    Since the scans with already saved with JPG compression, extracting them as lossless is meaningless.

    Save them without compression, then extract in a lossless format like PNG (smaller than TIF)

  5. #5
    Multiple User Jacal's Avatar
    Join Date
    Jun 2013
    Location
    Europe
    Posts
    329
    OS
    64-bit Win 10
    CPU Cores
    4

    Default

    Test:

    Lossless:

    2 instances of a png photo 400 x 267 x 24 BPP, 53194 unique colours, 166 KB

    Multipage tif created, ZIP compression, 519 KB

    Extracted as png: two identical images, 164 KB, 53194 colours, as expected.

    Lossy 1:

    Multipage tif created, jpeg compression, 357 KB.

    Extracted as png: two (for some reason slightly different) images, 160 and 164 KB, 54798 and 53194 (this one being same as original) colours. Loading original and extracted png (those with same numbers of colours) as layers in gimp in difference mode shows seemingly black image, but merged 'black' image has 323 unique colours.

    Lossy 2:

    Same jpeg compressed tif, extracted as jpg, quality 90, try to save orig. q.: slightly different images, 31 and 30 KB, 34620 in 34350 unique colours. Loading and merging original and this jpg in gimp the same way gives 'black' image containing 2102 colours.

    So it seems - based on this single clumsy test - that additional recompression, when extracting jpeg compressed tif, quite notably reduces the information. If you can not obtain uncompressed tifs and size is not a problem, you should probably extract your images in png format.

    Edit: typo.
    Last edited by Jacal; 01.04.2014 at 01:58 PM.

  6. #6
    Hobby User Sprintdriver's Avatar
    Join Date
    Aug 2006
    Location
    Norway
    Posts
    157
    OS
    32-bit Linux Distribution
    CPU Cores
    4

    Default

    Guys, it seems like you didn't fully understood what I ment.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	TIFF_extract.png 
Views:	959 
Size:	189.5 KB 
ID:	3779  
    If it hurts not to drint, don't waste the bottle then.

  7. #7
    Moderator Enterprise User Bhikkhu Pesala's Avatar
    Join Date
    May 2007
    Location
    East London
    Posts
    6,166
    OS
    64-bit Win 10
    CPU Cores
    1

    Default

    We understand fine. You don't understand that you cannot save as lossless from lossy. You already lost a whole load of detail with artefacts when compressing to JPG in a multipage TIF. Extracting that lossy data to a new JPG with the same lossy compression is not going to make it any worse, at least not that anyone would notice. If quality matters that much, don't compress the data in the first place.

    You can open and save a JPG at the same compression/quality settings many times before you will notice any loss of quality. The number of colours and artefacts will gradually increase, but you won't be able to tell the difference between blurred and more blurred.

    I guess you could always extract them as PNG images.
    Last edited by Bhikkhu Pesala; 01.04.2014 at 10:09 PM.

  8. #8
    Multiple User Jacal's Avatar
    Join Date
    Jun 2013
    Location
    Europe
    Posts
    329
    OS
    64-bit Win 10
    CPU Cores
    4

    Default

    Tif is, so it looks, not that kind of container, you can not take jpgs out and put them back without changing them, like you can, for instance, take mp3 sound out of avi file and mux it back in.

    Good night!

    Edit: made shorter
    Last edited by Jacal; 02.04.2014 at 01:12 AM.

  9. #9
    Hobby User Sprintdriver's Avatar
    Join Date
    Aug 2006
    Location
    Norway
    Posts
    157
    OS
    32-bit Linux Distribution
    CPU Cores
    4

    Default

    Quote Originally Posted by Bhikkhu Pesala View Post
    We understand fine. You don't understand that you cannot save as lossless from lossy.
    Well, when I zoom in to certain parts of the scanned TIFF files, there is visible jpg artifacts.
    From what you wrote, you probably just think I'm picky about the image quality, but saving to jpg in the usual way tends to give bigger file size than original file, while I reduce the quality just enough to get slightly smaller file size, I ends up with more visible jpg artifacts.
    I got your point, so maybe I just starting in the wrong end.

    As the files is originating from a network scanner, getting the uncompressed files is just an impossible option.

    I think I just get to save as jpg as you suggest. If IV can't do extract directly, then I won't spend any more time on it.

    Quote Originally Posted by Jacal View Post
    Tif is, so it looks, not that kind of container, you can not take jpgs out and put them back without changing them, like you can, for instance, take mp3 sound out of avi file and mux it back in.

    Good night!

    Edit: made shorter
    I just put that to the test using Avidemux. It looks like you're wrong. I got to successfully extract a pcm file from an avi file and an ac3 file from an mts video file. I do not have any avi file avaiable that actually contiains an MP3 audio track as pcm, aac and ac3 is the most common formats.
    If it hurts not to drint, don't waste the bottle then.

  10. #10
    Multiple User Jacal's Avatar
    Join Date
    Jun 2013
    Location
    Europe
    Posts
    329
    OS
    64-bit Win 10
    CPU Cores
    4

    Default

    My intent was to say you CAN extract sound (or video) from avi (mkv ...), replace it or put it back without recompression etc.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •