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
 Incorrect color with ImageEnView

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
michaeldca Posted - Dec 26 2016 : 14:04:21
I'm using the ImageEnView component to check the color of a TIFF file.

When doing the check it shows that the file is ImageEnView.IEBitmap.IsGrayScale = True, but the file is colored.

How do I make this differentiation?

Note: I need to know if the file is colored, grayscale or black and white.

Thank you very much in advance,

Michael
3   L A T E S T    R E P L I E S    (Newest First)
w2m Posted - Dec 26 2016 : 14:42:10
You still did not show all your code. My code does indeed work so you must be doing something else wrong. Submit a demo that shows the problem.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
michaeldca Posted - Dec 26 2016 : 14:32:01
I pass the whole component.

Function GetColorType (ImageEnView: TImageEnView): String;
Begin
   If (ImageEnView <> nil) then
   Begin
     If ImageEnView.IEBitmap.BitCount = 1 then
       Result: = 'PB'
     Else if ImageEnView.IEBitmap.IsGrayScale then
       Result: = 'GRAY'
     Else if ImageEnView.IEBitmap.PaletteUsed> 2 then
       Result: = 'COLOR'
     Else
       Result: = ''
   End;
End;
w2m Posted - Dec 26 2016 : 14:19:42
I already showed you how to do this with your pdf question.

This functions here so I have no idea why it does not work for you.

function GetColorType(AIEBitmap: TIEBitmap): TIEColorType;
begin
  if AIEBitmap.Bitcount = 1 then
    Result := ieBlackWhite
  else if AIEBitmap.IsGrayScale then
    Result := ieGrayScale
  else if AIEBitmap.PaletteUsed > 2 then
    Result := ieColor
  else
    Result := ieUnknown;
end;

You have to show the code you use to load the IEBitmap and the code you are using to test the color.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development