Community
Participate
Working Groups
Build ID: M20071023-1652 Multipage TIFF images are a standard in the oil industry. 100 or more images in a single TIFF file is not uncommon.
Created attachment 112149 [details] multi page tiff
Carolyn, looks like some more potential image work for 3.5.
Fixed > 20090811. I have released the code to handle multi-page TIFFs - it is fairly simple code. Unfortunately, the only multi-page TIFFs I can find are not currently supported by SWT's baseline TIFF reader. So for this feature to be useful, we need to also support the TIFF type requested in bug 57382.
Note that I only added decoder (loader) support and not encoder (unload) support. It should be fairly simple to add multi-file encoding support, because we do encode single TIFF files (just as standard baseline TIFF). I am reopening this bug as a place holder for encoding multi-page TIFFs.
(In reply to comment #4) > Note that I only added decoder (loader) support and not encoder (unload) > support. It should be fairly simple to add multi-file encoding support, because > we do encode single TIFF files (just as standard baseline TIFF). > > I am reopening this bug as a place holder for encoding multi-page TIFFs. Hi Carolyn, Has your new code (for decoding multi-page TIFFS) been released yet? When can I expect to be able to use it. BTW, thanks. Craig
(In reply to comment #5) > (In reply to comment #4) > > Note that I only added decoder (loader) support and not encoder (unload) > > support. It should be fairly simple to add multi-file encoding support, because > > we do encode single TIFF files (just as standard baseline TIFF). > > > > I am reopening this bug as a place holder for encoding multi-page TIFFs. > > Hi Carolyn, > Has your new code (for decoding multi-page TIFFS) been released yet? When can I > expect to be able to use it. BTW, thanks. > > Craig bump?
Sorry I didn't reply earlier. The code for decoding multi-page TIFFS has been in since fall 2009, which means it is in eclipse 3.6 and up. If it is not working for you, then it is possible that you need group iv tiff decoding, which is covered in bug 57382. If you really do mean "encoding" (or "writing") of multi-page tiff, then this shouldn't be too difficult to add however I don't have time to work on it. Lakshmi, do you have time? All you have to do is refactor TIFFDirectory(image).writeToStream(outputStream) a bit so that the header is always written before calling writeToStream. Then call writeToStream for each image in the ImageLoader.data array. You also have to write the IFD offsets in the same way that they are read and used in the loadFromByteStream() method. You can test using ImageAnalyzer example. Maybe open a multi-image (animated) gif and try saving it as multi-image tiff (and reading it back again).
(In reply to comment #7) > Sorry I didn't reply earlier. The code for decoding multi-page TIFFS has been > in since fall 2009, which means it is in eclipse 3.6 and up. If it is not > working for you, then it is possible that you need group iv tiff decoding, > which is covered in bug 57382. > > If you really do mean "encoding" (or "writing") of multi-page tiff, then this > shouldn't be too difficult to add however I don't have time to work on it. > > Lakshmi, do you have time? > > All you have to do is refactor TIFFDirectory(image).writeToStream(outputStream) > a bit so that the header is always written before calling writeToStream. Then > call writeToStream for each image in the ImageLoader.data array. You also have > to write the IFD offsets in the same way that they are read and used in the > loadFromByteStream() method. > > You can test using ImageAnalyzer example. Maybe open a multi-image (animated) > gif and try saving it as multi-image tiff (and reading it back again). Thanks Carolyn. I just need the decoding of the tiff into multiple SWT images. We don't actually write tiffs out but rather sometimes write jpgs of its pages. I'm very happy to hear it's been added and will report to my team that we should no longer need to convert to AWT images as intermediates. Thanks very much! Craig
Wait! I tried your attached image - patent.tif - and we don't read it correctly. All I saw was 17 blank pages. I ran tiffinfo on your tiff, and I see that all of the pages in it have group 4 (fax) encoding. Since this is not considered "Baseline TIFF" (i.e. it is one of the TIFF 6.0 extensions) we did not originally decode this type of tiff. So you need bug 57382 to be fixed first.
(In reply to comment #9) > Wait! I tried your attached image - patent.tif - and we don't read it > correctly. All I saw was 17 blank pages. > > I ran tiffinfo on your tiff, and I see that all of the pages in it have group 4 > (fax) encoding. Since this is not considered "Baseline TIFF" (i.e. it is one of > the TIFF 6.0 extensions) we did not originally decode this type of tiff. > > So you need bug 57382 to be fixed first. You are right on both counts. Oh well, back to using AWT intermediaries.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant, please remove the "stalebug" whiteboard tag.