Error loading multi page tiff with wxImage Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
ddv
Knows some wx things
Knows some wx things
Posts: 25
Joined: Mon Dec 18, 2006 4:23 pm

Error loading multi page tiff with wxImage

Post by ddv » Mon Dec 18, 2006 4:52 pm

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

User avatar
tierra
Site Admin
Site Admin
Posts: 1343
Joined: Sun Aug 29, 2004 7:14 pm
Location: Salt Lake City, Utah, USA
Contact:

Post by tierra » Mon Dec 18, 2006 11:47 pm

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.

Belgabor
I live to help wx-kind
I live to help wx-kind
Posts: 173
Joined: Mon Sep 25, 2006 1:12 pm

Post by Belgabor » Tue Dec 19, 2006 1:44 pm

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.

ddv
Knows some wx things
Knows some wx things
Posts: 25
Joined: Mon Dec 18, 2006 4:23 pm

Post by ddv » Tue Dec 19, 2006 2:31 pm

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.

ddv
Knows some wx things
Knows some wx things
Posts: 25
Joined: Mon Dec 18, 2006 4:23 pm

Post by ddv » Tue Dec 19, 2006 2:33 pm

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:

ddv
Knows some wx things
Knows some wx things
Posts: 25
Joined: Mon Dec 18, 2006 4:23 pm

Post by ddv » Tue Dec 19, 2006 5:10 pm

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.

Post Reply