Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, October 31, 2006 5:37:58 AM(UTC)
matt.long

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.

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, October 31, 2006 10:14:09 AM(UTC)

GregR  
GregR

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

 
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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.045 seconds.