LEADTOOLS Support
Imaging
Imaging SDK Questions
RasterImage.PageCount problem in version 19
#1
Posted
:
Sunday, May 3, 2015 9:57:38 PM(UTC)
Groups: Registered
Posts: 7
Hi,
When I load the attached gif by:
using (var codecs = new RasterCodecs())
{
var image = codecs.Load(stream))
Console.WriteLine(image.PageCount)
}
In version 17.5 I get 28 pages (in image.PageCount) while in version 19 I get just 1 page!
Why?
Please your help,
Thanks,
Roi
RoiB attached the following image(s):
#2
Posted
:
Monday, May 4, 2015 6:06:49 AM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 71
Was thanked: 4 time(s) in 3 post(s)
In previous versions of LEADTOOLS when RasterCodecs tried to load a file, it would call all Load methods affected with the AllPages options set to true, by default, to try to obtain information about the file it was trying to load(if it supports multiple pages, the number of pages to load).
This would result in slower loading time with larger files and sometimes would give an out of memory error with very large multipage files. Because of this we have now changed them to only load the first page by default.
However, this can be set back to the prior usage by either setting codecs.Options.Load.AllPages to true or by using any of the overload versions that accept first and last page number parameters.
https://www.leadtools.com/help/leadtools/v19/dh/co/leadtools.codecs~leadtools.codecs.codecsloadoptions~allpages.html
Aaron Brasington
Developer Support Engineer
LEAD Technologies, Inc.
![LEAD Logo LEAD Logo](https://www.leadtools.com/images/new-site-images/leadtools-logo-header.png)
LEADTOOLS Support
Imaging
Imaging SDK Questions
RasterImage.PageCount problem in version 19
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.