Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
dandy  
#1 Posted : Wednesday, May 9, 2018 10:24:30 AM(UTC)
dandy

Rank: Newbie

Groups: Member
Joined: 4/22/2018(UTC)
Posts: 3

We have a CMYK Pdf coming in from a client with transparency. We are trying to convert this to a PNG without an alpha channel. When we do this, the image that is generated is a pure white image only. We are stuck and have no idea what to do at this point. It handles when the user puts a transparent RGB image, but does not handle a CMYK image with alpha. Here is our code:

Code:
using (var reader = ImageReader.Create(OriginalFilepath))

                using (var converter = new Aurigma.GraphicsMill.Transforms.ColorConverter(PixelFormat.Format24bppRgb))
                using (var writer = ImageWriter.Create(WorkingFilepath))
                {
                    // If no color profile is set
                    converter.DefaultSourceProfile = reader.ColorProfile;
                    if (reader.ColorProfile == null)
                        converter.DefaultSourceProfile = new ColorProfile(Configuration.ProfilesDirectory + "ISOcoated_v2_eci.icc");

                    if (reader.PixelFormat.IsRgb && reader.PixelFormat != PixelFormat.Format24bppRgb)
                    {
                        converter.BackgroundColor = RgbColor.White;

                        // Assign some default color profile
                        converter.DefaultSourceProfile = ColorProfile.FromSrgb();
                        converter.DestinationProfile = ColorProfile.FromSrgb();
                    }
                    if (reader.PixelFormat.IsCmyk)
                    {
                        converter.BackgroundColor = new CmykColor(0, 0, 0, 0, 100);

                        converter.ColorManagementEngine = ColorManagementEngine.LittleCms;
                        converter.DestinationProfile = ColorProfile.FromSrgb();
                    }

                    Pipeline.Run(reader + converter + writer);
                }
            }


Any help would be appreciated.

Edited by moderator Thursday, May 10, 2018 1:50:14 AM(UTC)  | Reason: Not specified

Julia Khoptyan  
#2 Posted : Wednesday, May 9, 2018 10:32:24 PM(UTC)
Julia Khoptyan

Rank: Advanced Member

Groups: Member
Joined: 8/19/2016(UTC)
Posts: 33

Was thanked: 1 time(s) in 1 post(s)
Hey dandy,

Is it possible to post here the source PDF? You can also share it privately using any preferable cloud storage (my email y.khoptyan@aurigma.com).

Thanks,
Julia
dandy  
#3 Posted : Thursday, May 10, 2018 9:14:09 PM(UTC)
dandy

Rank: Newbie

Groups: Member
Joined: 4/22/2018(UTC)
Posts: 3

Julia,

I sent the file via WeTransfer.

Thanks.
Andrey Semenov  
#4 Posted : Sunday, May 13, 2018 9:51:15 PM(UTC)
Andrey Semenov

Rank: Advanced Member

Groups: Member
Joined: 7/4/2017(UTC)
Posts: 43

Was thanked: 12 time(s) in 12 post(s)
Thanks for the bug report, the problem is reproduced.
We will inform you once it will be fixed.

Regards,
Andrew
dandy  
#5 Posted : Monday, May 14, 2018 4:53:22 AM(UTC)
dandy

Rank: Newbie

Groups: Member
Joined: 4/22/2018(UTC)
Posts: 3

Andrey, do you have a timeframe? I'm using a workaround, but it's not very fast.
Julia Khoptyan  
#6 Posted : Wednesday, May 16, 2018 9:48:32 PM(UTC)
Julia Khoptyan

Rank: Advanced Member

Groups: Member
Joined: 8/19/2016(UTC)
Posts: 33

Was thanked: 1 time(s) in 1 post(s)
Hey dandy,

The issue will be fixed in the next update. We will keep you posted.

Thanks,
Julia

Edited by user Wednesday, May 16, 2018 9:56:19 PM(UTC)  | Reason: Not specified

Andrey Semenov  
#7 Posted : Monday, June 18, 2018 4:58:23 AM(UTC)
Andrey Semenov

Rank: Advanced Member

Groups: Member
Joined: 7/4/2017(UTC)
Posts: 43

Was thanked: 12 time(s) in 12 post(s)
The problem was resolved in the latest release (9.3.33).
Users browsing this topic
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.