nagyistoce / windowsbitmapdencoder

Automatically exported from code.google.com/p/windowsbitmapdencoder
0 stars 0 forks source link

not supported tif file issue #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I try to open a tif file, it gives compression no support error.

What is the expected output? What do you see instead?
Give error message. I debug compression function, imageDEncoder show 
compression type 16777217. This is 24bit color length I think.

What version of the product are you using? On what operating system?
ImageDEncoder v.0.7.1 with Adobe Flash Builder v4.1 on Win7x64
resim_yeni.tif can opened by alot of programs (photoshop, gimp 2.0, irfanview, 
windows 7, mspaint)

Please provide any additional information below.
I attach tif files to message. One of them is original, the other one (name end 
with adobe) is adobe save as file. I get orginal tif file from oracle database 
as stream, so I can't convert it.
I looked up differences in ImageInfo with AsTiffTagViewer 
(http://www.awaresystems.be/imaging/tiff/astifftagviewer.html). Result for 
resim_yeni is:
SubFileType (1 Long): Zero
ImageWidth (1 Long): 483
ImageLength (1 Long): 611
BitsPerSample (3 Short): 8, 8, 8
Compression (1 Short): Uncompressed
Photometric (1 Short): RGB
ImageDescription (512 ASCII):                                              ...
StripOffsets (28 Long): 995, 32873, 64751, 96629, 128507, 160385,...
SamplesPerPixel (1 Short): 3
RowsPerStrip (1 Long): 22
StripByteCounts (28 Long): 31878, 31878, 31878, 31878, 31878, 31878,...
XResolution (1 Rational): 300
YResolution (1 Rational): 300
PlanarConfig (1 Short): Contig
ResolutionUnit (1 Short): Inch
Software (31 ASCII): Oracle Multimedia Toolkit, 10.1

Result for resim_yeni_adobe:
SubFileType (1 Long): Zero
ImageWidth (1 Short): 483
ImageLength (1 Short): 611
BitsPerSample (3 Short): 8, 8, 8
Compression (1 Short): Uncompressed
Photometric (1 Short): RGB
ImageDescription (512 ASCII):                                              ...
StripOffsets (1 Long): 23738
Orientation (1 Short): TopLeft
SamplesPerPixel (1 Short): 3
RowsPerStrip (1 Short): 611
StripByteCounts (1 Long): 885339
XResolution (1 Rational): 300
YResolution (1 Rational): 300
PlanarConfig (1 Short): Contig
ResolutionUnit (1 Short): Inch
Software (28 ASCII): Adobe Photoshop CS4 Windows 
DateTime (20 ASCII): 2011:04:24 11:25:56 
700 (16412 Byte): 60, 63, 120, 112, 97, 99, 107, 101, 116, 32,...
RichTiffIPTC (523 Undefined): 
Photoshop (5942 Byte): 56, 66, 73, 77, 4, 4, 0, 0, 0, 0, 2, 11, 28,...
34665 (1 Long): 909080

I am working on in but I am newbie on flex.

Original issue reported on code.google.com by mkys...@gmail.com on 24 Apr 2011 at 9:33

Attachments:

GoogleCodeExporter commented 9 years ago
I found problem and fix it. At DirEntry.as file, on line 96. Every time 4 bytes 
reading, it doen't check len value. In my tif sample, Oracle database write 01 
hex value on emty bytes. I limit reading bytes with len value.
Old lines:
----------
lValOff = uint(bytes[offset+i+8]);
lValOff+= (uint(bytes[offset+i+9])<<8);
lValOff+= (uint(bytes[offset+i+10])<<(8*2)); 
lValOff+= (uint(bytes[offset+i+11])<<(8*3));

New lines:
----------
lValOff = 0;
for(var m:int=0; m<len; m++) {
    lValOff += uint(bytes[offset+i+8+m]<<(8*m));
}

I attach correct file to message.

Original comment by mkys...@gmail.com on 4 May 2011 at 11:22

Attachments:

GoogleCodeExporter commented 9 years ago
Maybe some people need full package.

Original comment by mkys...@gmail.com on 4 May 2011 at 11:31

Attachments: