Error when tiff compression mode is tiff_lzw

Bug #392907 reported by Nadia Alramli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Phatch
Fix Released
Low
Nadia Alramli

Bug Description

Hi,

I got the following issue when attempting to save a tiff image generated by Grab (Mac OSX screenshot utility).
You can replicate the issue by saving any tiff image in 'lzw' compression mode and then try to save the result again in phatch. A patch is attached.

Here is the log output:
Warning 0: Subprocess "tiffcp" output:
LIBTIFF, Version 3.8.2
Copyright (c) 1988-1996 Sam Leffler
Copyright (c) 1991-1996 Silicon Graphics, Inc.

usage: tiffcp [options] input... output
where options are:
 -a append to output instead of overwriting
 -o offset set initial directory offset
 -p contig pack samples contiguously (e.g. RGBRGB...)
 -p separate store samples separately (e.g. RRR...GGG...BBB...)
 -s write output in strips
 -t write output in tiles
 -i ignore read errors
 -b file[,#] bias (dark) monochrome image to be subtracted from all others
 -,=% use % rather than , to separate image #'s (per Note below)

 -r # make each strip have no more than # rows
 -w # set output tile width (pixels)
 -l # set output tile length (pixels)

 -f lsb2msb force lsb-to-msb FillOrder for output
 -f msb2lsb force msb-to-lsb FillOrder for output

 -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding
 -c zip[:opts] compress output with deflate encoding
 -c jpeg[:opts] compress output with JPEG encoding
 -c packbits compress output with packbits encoding
 -c g3[:opts] compress output with CCITT Group 3 encoding
 -c g4 compress output with CCITT Group 4 encoding
 -c none use no compression algorithm on output

Group 3 options:
 1d use default CCITT Group 3 1D-encoding
 2d use optional CCITT Group 3 2D-encoding
 fill byte-align EOL codes
For example, -c g3:2d:fill to get G3-2D-encoded data with byte-aligned EOLs

JPEG options:
 # set compression quality level (0-100, default 75)
 r output color image as RGB rather than YCbCr
For example, -c jpeg:r:50 to get JPEG-encoded RGB data with 50% comp. quality

LZW and deflate options:
 # set predictor value
For example, -c lzw:2 to get LZW-encoded data with horizontal differencing

Note that input filenames may be of the form filename,x,y,z
where x, y, and z specify image numbers in the filename to copy.
example: tiffcp -c none -b esp.tif,1 esp.tif,0 test.tif
  subtract 2nd image in esp.tif from 1st yielding uncompressed result test.tif

Action: {'fields': {'As': u'<type>',
            'File Name': u'<filename>',
            'In': u'<folder>_phatch/<subfolder>',
            'JPEG Quality': u'85',
            'JPEG Size Maximum': '0kb',
            'JPEG Size Tolerance': '5%',
            'Metadata': 'yes',
            'PNG Optimize': 'no',
            'Resolution': u'<dpi>',
            'Show Type Options': 'no',
            'TIFF Compression': u'<compression>',
            '__enabled__': 'yes'},
 'label': 'Save'}

None
*

Revision history for this message
Nadia Alramli (nadiana) wrote :
Revision history for this message
Nadia Alramli (nadiana) wrote :

Attaching a sample image that will generate the error

Revision history for this message
Stani (stani) wrote :

$ bzr commit phatch/lib/libtiff.py -m "add lzw support"
Committing to: /home/stani/sync/python/phatch/trunk/
modified phatch/lib/libtiff.py
Committed revision 1012.
$ bzr push bzr+ssh://<email address hidden>/~stani/phatch/dev
Pushed up to revision 1012.

Changed in phatch:
assignee: stani (stani) → Nadia (nadia)
status: New → Fix Committed
Stani (stani)
Changed in phatch:
milestone: none → 0.2.1
status: Fix Committed → Fix Released
Stani (stani)
Changed in phatch:
assignee: Nadia (nadia) → Nadia Alramli (nadiana)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.