TiffGetPageCount returns 0 on single page readonly tifs

General discussions about GdPicture.NET.
Post Reply
edlemus
Posts: 26
Joined: Sat Jan 17, 2009 11:10 am

TiffGetPageCount returns 0 on single page readonly tifs

Post by edlemus » Tue Jan 18, 2011 11:40 pm

Hi,

In my application I'm getting the page count with TiffGetPageCount, but when the TIF file opened with CreateGdPictureImageFromFile as read only has only 1 page, the page count returns 0.
Is this an issue?
Before loading I have no other way to know if this is a single page tif, opening for write gives the actual 1 size, but for speed reasons I need to open it as read only.
Thanks in advance.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: TiffGetPageCount returns 0 on single page readonly tifs

Post by Loïc » Wed Jan 19, 2011 2:03 pm

Hi,

TiffGetPageCount() method is for multipage tiff only. Check reference guide for more details. So, you can consider than 0 results means that your image is a single-page image.

Kind regards,

Loïc

edlemus
Posts: 26
Joined: Sat Jan 17, 2009 11:10 am

Re: TiffGetPageCount returns 0 on single page readonly tifs

Post by edlemus » Wed Jan 19, 2011 5:18 pm

Hi,

I know it's easy to work around this. But I still think it's not the best approach, it should return 1.
Anyway, thanks for the quick answer.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest