This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Notification

Icon
Error

Options
Go to last post Go to first unread
luvain  
#1 Posted : Sunday, August 15, 2021 5:49:57 PM(UTC)
luvain

Rank: Newbie

Groups: Guest
Joined: 8/15/2021(UTC)
Posts: 2

Dear sir,

I add one extra channel in the tiff image according to the extra channels example in github, but seems the extra channel is an alpha channel and how to change it into a real sopt color channel.
What I really want is the image can be opened in photoshop and view 5(cmyk+spot) channel and the last channel is a sopt channel in photoshop.
Thanks in advance!

Edited by user Sunday, August 15, 2021 6:15:28 PM(UTC)  | Reason: Not specified

luvain  
#2 Posted : Sunday, August 15, 2021 6:12:57 PM(UTC)
luvain

Rank: Newbie

Groups: Guest
Joined: 8/15/2021(UTC)
Posts: 2

By the way, the extra bitmap is a gray8 bitmap.

var extraChannel = new TiffExtraChannelEntry(bitmap, TiffChannelType.Color);
writer.ExtraChannels.Add(extraChannel);
Pipeline.Run(reader + writer);

Edited by user Sunday, August 15, 2021 6:13:30 PM(UTC)  | Reason: Not specified

Eugene Kosmin  
#3 Posted : Thursday, August 19, 2021 1:40:27 AM(UTC)
Eugene Kosmin

Rank: Advanced Member

Groups: Guest
Joined: 9/19/2006(UTC)
Posts: 505

Was thanked: 41 time(s) in 41 post(s)
Hi,

Check the following code.

It produces a TIFF with one extra channel. Photoshop shows it as a separate channel.

Code:
using (var src = new Bitmap(300, 300, PixelFormat.Format32bppCmyk, RgbColor.White))
using (var writer = new TiffWriter("out.tif"))
{
    using (var extraBitmap = new Bitmap(src.Width, src.Height, PixelFormat.Format8bppGrayscale, RgbColor.White))
    {
        var extraChannel = new TiffExtraChannelEntry(extraBitmap, TiffChannelType.Color);

        writer.ExtraChannels.Add(extraChannel);
        Pipeline.Run(src + writer);
    }
}
Best regards,
Eugene Kosmin
The Aurigma Development Team
Users browsing this topic
Guest
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.