Loading...

TiffGetPageCount returns 0 on single page readonly tifs

General discussions about GdPicture.NET.

TiffGetPageCount returns 0 on single page readonly tifs

Postby 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.
edlemus
 
Posts: 24
Joined: Sat Jan 17, 2009 11:10 am

Re: TiffGetPageCount returns 0 on single page readonly tifs

Postby 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
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4442
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: TiffGetPageCount returns 0 on single page readonly tifs

Postby 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.
edlemus
 
Posts: 24
Joined: Sat Jan 17, 2009 11:10 am


Return to General discussions

Who is online

Users browsing this forum: No registered users and 1 guest