commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Damjan Jovanovic (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SANSELAN-72) Incorrect reading TIFF file
Date Thu, 12 Apr 2012 04:56:59 GMT

    [ https://issues.apache.org/jira/browse/SANSELAN-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13252201#comment-13252201
] 

Damjan Jovanovic commented on SANSELAN-72:
------------------------------------------

TIFF fields as seen by Sanselan:

	Root:  (tiffImageData)
		New Subfile Type: 0
		Image Width: 2481
		Image Length: 3509
		Bits Per Sample: 1
		Compression: 5
		Photometric Interpretation: 0
		Preview Image Start: 26402, 38118, 64494, 83426, 91444
		Orientation: 1
		Samples Per Pixel: 1
		Rows Per Strip: 842
		Preview Image Length: 11715, 26375, 18932, 8017, 2434
		XResolution: 1181102/10000 (118.11)
		YResolution: 1181102/10000 (118.11)
		Resolution Unit: 3
		Software: 'Adobe Photoshop CS3 Windows'
		Date Time: '2011:04:12 17:12:48'
		XMP: 60, 63, 120, 112, 97, 99, 107, 101, 116, 32, 98, 101, 103, 105, 110, 61, 34, -17, -69,
-65, 34, 32, 105, 100, 61, 34, 87, 53, 77, 48, 77, 112, 67, 101, 104, 105, 72, 122, 114, 101,
83, 122, 78, 84, 99, 122, 107, 99, 57, 100, 34... (14990)
		Photoshop Settings: 56, 66, 73, 77, 4, 37, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 56, 66, 73, 77, 4, 47, 0, 0, 0, 0, 0, 74, 2, 0, 1, 0, 72, 0, 0, 0, 72,
0, 0... (11066)
		Exif Offset: 93880

	Exif: 
		Color Space: -1
		Exif Image Width: 2481
		Exif Image Length: 3509

Summary:
BitsPerSample=1 and SamplesPerPixel=1 so it's black and white.
Compression=5 (LZW). This is unsupported by baseline TIFF, but Sanselan should support it.
PhotometricInterpretation=0 (White is zero).
RowsPerStrip=842, which is exactly where the black lines appear.

Now what's causing the black lines, broken LZW decompression or the tiling of the decompressed
strips?

                
> Incorrect reading TIFF file
> ---------------------------
>
>                 Key: SANSELAN-72
>                 URL: https://issues.apache.org/jira/browse/SANSELAN-72
>             Project: Commons Sanselan
>          Issue Type: Bug
>          Components: Format: PNG, Format: TIFF
>    Affects Versions: 1.x
>            Reporter: VVD
>         Attachments: in.png, in.tif, out-png-IM.png, out-tif.png
>
>
> I found 2 bugs.
> I have tif file in.tif.
> 1. After convert it to png (bmp, tga, etc) by Sanselan it getting horizontal lines.
> {code}
> Sanselan.writeImage(Sanselan.getBufferedImage(new File("in.tif")), new File("out-tif.png"),
ImageFormat.IMAGE_FORMAT_PNG, null);
> {code}
> gwenview, eog, kolourpaint, gimp, etc show in.tif without lines and out.png with lines.
> For example 1st line at ~860 points from top and in full width of picture.
> 2. After convert it to png by convert utility from ImageMagic, and then convert it to
png (bmp, tga, etc) by Sanselan it became "gray" - all white pixels become gray.
> {code}$ convert in.tif in.png{code}
> {code}
> Sanselan.writeImage(Sanselan.getBufferedImage(new File("in.png")), new File("out-png-IM.png"),
ImageFormat.IMAGE_FORMAT_PNG, null);
> {code}
> gwenview, eog, kolourpaint, gimp, etc show in.png as black and white, but out-png-IM.png
as black and gray.
> I'll attach all 4 files.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message