LEADTOOLS Support
General
General Questions
Re: Size in bytes of a RasterImage object
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Tuesday, October 31, 2006 5:37:58 AM(UTC)
Groups: Registered
Posts: 4
Hi,
Is there any way to tell the size in bytes of a RasterImage object without writing it to the filesystem?
Thanks
Matt.
#2
Posted
:
Tuesday, October 31, 2006 10:14:09 AM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 764
Use this equation to calculate the size of an image in memory:
ImageWidth * ImageHeight * Bpp
Note that Bpp in this equation is Bytes per pixel, this means that you would use the bpp (bits per pixel) divided by 8:
ImageWidth * ImageHeight * (bpp / 8)
However, there is no way to calculate the size of a file on disk because of the possible compression algorithms used.
Note:
Because of byte alignment, the size might not be given exactly by the above formula in all cases.
Edited by moderator Friday, August 9, 2019 8:49:40 AM(UTC)
| Reason: Not specified
LEADTOOLS Support
General
General Questions
Re: Size in bytes of a RasterImage object
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.