ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Image Size in bytes
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

bperkins

USA
1 Posts

Posted - Nov 11 2011 :  09:51:29  Show Profile  Reply
I've been looking for a simple way to determine the size in bytes of the loaded image. I don't want to have to write the image to disk and see the image size in bytes. I have the image loaded I should be able to tell the size.

Thank you

xequte

39056 Posts

Posted - Nov 11 2011 :  11:26:26  Show Profile  Reply
Hi

24bit color images have 3 RGB values per pixel so you can work out the size in bytes as:

W X H x 3


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

johnrboren

USA
12 Posts

Posted - Nov 29 2011 :  15:14:45  Show Profile  Reply
Following up on this, why don't you have a property that does this for us? Meaning, instead of me determining the bit of the image, just have you test that and publish a read-only property that has the actual size.

JOHN BOREN
Go to Top of Page

fab

1310 Posts

Posted - Nov 30 2011 :  01:47:18  Show Profile  Reply
A more generic way:
size := ImageEnView1.IEBitmap.Height * ImageEnView1.IEBitmap.RowLen;

It measures size in bytes, counting also padding bytes, for all pixel formats.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: