Rank: Member
Groups: Guest
Joined: 7/25/2007(UTC) Posts: 18
Thanks: 1 times
|
Hi, I'm trying to use the TiffFrame ExtraChannels property to create a TIFF image with five channels. The example at http://www.aurigma.com/d...ithTIFFExtraChannels.htm only shows how to create an image file with five channels. It doesn't show how to do this without writing to a file. I've tried: Code:
private void makeFiveLevelImage()
{
Aurigma.GraphicsMill.Codecs.TiffExtraChannel tiffChannel =
new Aurigma.GraphicsMill.Codecs.TiffExtraChannel(mask, Aurigma.GraphicsMill.Codecs.TiffChannelType.Undefined);
Aurigma.GraphicsMill.Codecs.TiffFrame tiffFrame = new Aurigma.GraphicsMill.Codecs.TiffFrame();
tiffFrame.SetBitmap(tif);
tiffFrame.ExtraChannels.Add(tiffChannel);
bm = new Aurigma.GraphicsMill.Bitmap();
tiffFrame.GetBitmap(bm);
bm.Save("bm.tif");
}
But the bitmap I get from the TiffFrame only seems to contain four channels. What am I doing wrong?
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/9/2008(UTC) Posts: 554
Was thanked: 1 time(s) in 1 post(s)
|
Hi Alan, First of all, if you want to add extra channels you should use TiffWriter as described in example, unfortunately there is no another way to do it. You cannot use Save() method of Bitmap, as Bitmap does not support the extra channels. So, your code snippet does not work. Please use the sample from article. Quote:It doesn't show how to do this without writing to a file. If you do not want to save it as file, could you explain what you expect to get as a result in detail? Edited by user Tuesday, February 9, 2010 11:46:20 AM(UTC)
| Reason: Not specified |
|
|
|
|
Rank: Member
Groups: Guest
Joined: 7/25/2007(UTC) Posts: 18
Thanks: 1 times
|
Tamila, I found a way to do it using the Aurigma.GraphicsMill.ChannelsProvider class, which contains methods AddAlpha () and DiscardAlpha ().
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 8/3/2003(UTC) Posts: 1,070
Thanks: 1 times Was thanked: 12 time(s) in 12 post(s)
|
Great. Do not hesitate to contact our support team if you have any questions. |
|
|
|
|
Forum Jump
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.