LEADTOOLS Support
General
LEADTOOLS SDK Examples
Get image sizes/color info/etc. without loading into imageviewer
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Friday, July 30, 2010 2:57:01 AM(UTC)
Groups: Registered
Posts: 17
Hi, I can't seem to find info on how to get the file image info (pixelwidth/number of colors/etc) without loading it into a rasterimageviewer. This takes unnecessary cycles, is there a way to get the info from just the file headers and read them without loading? can u give sample for Tiff images? thanks.
#2
Posted
:
Sunday, August 1, 2010 2:45:19 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
You can use CodecsImageInfo Class to get some information about images supported by LEADTOOLS without loading them.
Some of the properties you can get:
- BitsPerPixel
- ColorSpace
- Compression
- HasAlpha
- SizeDisk
Here's a sample:
CodecsImageInfo imageInfo = codecs.GetInformation(srcFileName, true);
int i = imageInfo.BitsPerPixel;
For more information please see the help topic "CodecsImageInfo Class" in our .NET help file.
#3
Posted
:
Sunday, August 8, 2010 8:12:53 PM(UTC)
Groups: Registered
Posts: 17
Thanks much Basel, it's working great.
LEADTOOLS Support
General
LEADTOOLS SDK Examples
Get image sizes/color info/etc. without loading into imageviewer
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.