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 : Monday, October 15, 2012 11:14:24 AM(UTC)

tphelps  
tphelps

Groups: Registered
Posts: 2


I would like to create a 1-bit RasterImage with the GrayscaleMode set to OrderedInverse (i.e. WhiteIsZero). How is this accomplished?
 

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 16, 2012 5:44:25 AM(UTC)

Ibrahim  
Guest

Groups: Guests
Posts: 3,040

Was thanked: 1 time(s) in 1 post(s)

Hello,
Yes you can do that, but in LEADTOOLS, 1-bit black and white image are usually not referred to as "gray". We call them bitonal images.

Anyway, you can use the RasterImage constructor that takes a palette, and supply a palette where the first entry (index 0) is white and the second entry (index 1) is black.

For details, see the RasterImage Constructor documentation in our .NET help.
 
#3 Posted : Tuesday, October 16, 2012 6:46:38 AM(UTC)

tphelps  
tphelps

Groups: Registered
Posts: 2


Thank you very much. The reason for referring to the GrayscaleMode is because that was the only property I could see that was different when loading a TIFF with Photometric Interpretation of WhiteIsZero vs. BlackIsZero. In neither case was there a color palette defined on the resultant RasterImage object, so I wasn't sure whether that could be used when creating one to control the Photometric Interpretation.
 
#4 Posted : Wednesday, October 17, 2012 5:30:42 AM(UTC)

Ibrahim  
Guest

Groups: Guests
Posts: 3,040

Was thanked: 1 time(s) in 1 post(s)

If you're using the normal .NET Windows Forms assemblies, all images that are 8-bit or below will have a palette with them, even if they were grayscale. If you're using something else, please tell me what it is.
Also, tell me how exactly you're loading the image, and if possible, send me a couple of them in a ZIP or RAR file.
 
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-2019, Yet Another Forum.NET
This page was generated in 0.117 seconds.