Page 1 of 1

Error loading multi page tiff with wxImage

Posted: Mon Dec 18, 2006 4:52 pm
by ddv
Hello folks!

I have errors when loading multi page TIFFs using wxImage: some are successfully loaded but most generate some errors or warnings.
The number of pages in these TIFFs varies from 2 to 13.

For example, an image with 13 pages generates these errors:
- tiff module: image
- Integer overflow in TIFFVTileSize
- tiff module: TIFFReadDirectory
- image: cannot handle zero tile size
- TIFF: Error loading image

and the GetImageCount returns 0 :?

Another one seems to be successfully loaded but with a series of warnings:
- tiff module: TIFFReadDirectory
- image: unknown field tag 32934 (0x80a6) encountered

Any ideas ?

Note: I use wxWidgets 2.6.3 on Windows XP

Posted: Mon Dec 18, 2006 11:47 pm
by tierra
wxWidgets comes with a really old version of libtiff. I don't think it's old enough that it's missing any new tiff features (when was the last one added?), but it may have some bugs causing this that have since been fixed in newer versions of libtiff. You could try to update the sources in wxWidgets and rebuild it yourself, though this is something that really should be updated in wxWidgets sources either way, so it may help to request this on the mailing list (it's been brought up in the last year, but nothing was done about it).

It might also help to know what application (and version) was used to create the tiff files in question.

Posted: Tue Dec 19, 2006 1:44 pm
by Belgabor
How do you compile wxWidgets? I use Mingw/msys and having installed libtiff before compiling wxWidgets makes it use the external (recent) one, not the enclosed sources.

Posted: Tue Dec 19, 2006 2:31 pm
by ddv
tierra wrote:wxWidgets comes with a really old version of libtiff. I don't think it's old enough that it's missing any new tiff features (when was the last one added?), but it may have some bugs causing this that have since been fixed in newer versions of libtiff. You could try to update the sources in wxWidgets and rebuild it yourself, though this is something that really should be updated in wxWidgets sources either way, so it may help to request this on the mailing list (it's been brought up in the last year, but nothing was done about it).

It might also help to know what application (and version) was used to create the tiff files in question.
Someone in my company manages the wxWidgets sources update and its compilation, but I will try to download, compile and test myself the last version of wxWidgets.

The TIFFs were created a long time ago, so I don't really remember the software used, but I think it was an old version of Paint Shop pro.

Posted: Tue Dec 19, 2006 2:33 pm
by ddv
Belgabor wrote:How do you compile wxWidgets? I use Mingw/msys and having installed libtiff before compiling wxWidgets makes it use the external (recent) one, not the enclosed sources.
As far as I know, Ms visual studio 7.1 is used, and libtiff enclosed sources are used, not external ones.
I will try new wxWidgets with external libtiff and tell you :wink:

Posted: Tue Dec 19, 2006 5:10 pm
by ddv
Ok, using wxWidgets 2.8.0 and external libtiff 3.8.2, every TIFF works :)

But using wxWidgets 2.8.0 with included libtiff is not enough.

Thanks all.

Note: it would be great for the maintainer of wxWidgets to update the included libtiff version.