LEADTOOLS Support
Imaging
Imaging SDK Questions
Create blank image with GrayscaleMode of OrderedInverse
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Monday, October 15, 2012 11:09:24 AM(UTC)
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?
#2
Posted
:
Tuesday, October 16, 2012 5:39:25 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 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:41:38 AM(UTC)
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:25:42 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 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.
LEADTOOLS Support
Imaging
Imaging SDK Questions
Create blank image with GrayscaleMode of OrderedInverse
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.