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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Gray or Color

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
graph_man Posted - Jul 20 2021 : 17:38:56
All opened images are 24bit.

ImageEnView1.IO.Params.BitsPerSample = 8;
ImageEnView1.IO.Params.SamplesPerPixel = 3;

How to determine which image is color or gray?
5   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jul 22 2021 : 06:47:51
Hi

You can email me for the beta, or await the official release in a couple of weeks.

Nigel
Xequte Software
www.imageen.com
graph_man Posted - Jul 22 2021 : 06:07:55
Thanks.
How to get this update?

ps
Is there a way to use a workaround by counting the number of colors in an image?
xequte Posted - Jul 21 2021 : 19:18:01
That is because the image is not truly gray-scale. For instance, look at pixel 715,2017, you will see that its RGB value is (33,30,25).

For the next update I have added a tolerance value to IsGrayScale, so this works:

If ImageEnView1.IEBitmap.IsGrayScale() then
  ShowMessage( 'Image is gray scale' )
else
If ImageEnView1.IEBitmap.IsGrayScale(10) then
  ShowMessage( 'Image is almost gray scale' )
else
  ShowMessage( 'Image is colored' );




Nigel
Xequte Software
www.imageen.com
graph_man Posted - Jul 21 2021 : 07:40:19
Thanks, but for some reason this function does not always work.
I sent you the test file by e-mail.
xequte Posted - Jul 21 2021 : 06:19:26
Hi

You can use:

If ImageEnView1.IEBitmap.IsGrayScale() then
  ShowMessage( 'Image is gray scale' );

https://www.imageen.com/help/TIEBitmap.IsGrayScale.html

For certain image formats you can do it more quickly using the image properties.

Nigel
Xequte Software
www.imageen.com