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

Notification

Icon
Error

Options
Go to last post Go to first unread
Ben VS  
#1 Posted : Wednesday, September 27, 2017 2:23:28 AM(UTC)
Ben VS

Rank: Newbie

Groups: Member
Joined: 6/3/2016(UTC)
Posts: 2

I am converting a jpeg image with a colour profile of : Coated FOGRA39 (ISO 12647-2:2004) to RGB with a colour profile of sRGB using the following code:
Code:
private sub ConvertToRGB(byref img as Aurigma.GraphicsMill.bitmap, profile as string)
        'Choose LittleCMS color management engine
        img.ColorManagement.ColorManagementEngine = Aurigma.GraphicsMill.Transforms.ColorManagementEngine.LittleCms

        if profile = "" andAlso img.IsCMYK then
            'Assign output RGB profile for conversion
            img.ColorManagement.RgbColorProfile = Aurigma.GraphicsMill.ColorProfile.FromSrgb
        elseif profile <> "" then
            profile = "C:\windows\system32\spool\drivers\color\" & profile & ".icc"
            try
                img.ColorManagement.RgbColorProfile = New Aurigma.GraphicsMill.ColorProfile(profile)
            catch e as exception
                throw new Exception("Could not find RGB Colour Profile: " & e.message)
            end try
        end if

        if img.colorProfile is nothing then
                if img.isRGB then
                    img.ColorProfile = Aurigma.GraphicsMill.ColorProfile.FromSrgb
                else
                    img.ColorProfile = new ColorProfile("C:\windows\system32\spool\drivers\color\RSWOP.icm")
                end if
        end if      
        
        'Convert to RGB
        if img.ColorManagement.RgbColorProfile isnot nothing then
            img.ColorManagement.ConvertToContinuous(Aurigma.GraphicsMill.ColorSpace.Rgb, False, img.IsExtended)        
        end if
    end sub
It seems that the red in the converted image is much brighter. See attached Converted RGB image.jpgOriginal CMYK image.jpg Not sure if there is something that can be done about this or if this is expected when converting between these colour profiles?

Edited by user Wednesday, September 27, 2017 2:36:29 AM(UTC)  | Reason: Not specified

Eugene Kosmin  
#2 Posted : Friday, September 29, 2017 2:31:48 AM(UTC)
Eugene Kosmin

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 9/19/2006(UTC)
Posts: 414

Was thanked: 14 time(s) in 14 post(s)
Hi Ben, It looks like your version of GM is pretty old. I tried your image with the recent version, and it worked fine. Here is my code:
Code:
using (var bitmap = new Bitmap("Original CMYK image.jpg"))
{
    bitmap.ColorManagement.DestinationProfile = ColorProfile.FromSrgb();
    bitmap.ColorManagement.ColorManagementEngine = ColorManagementEngine.LittleCms;
    bitmap.ColorManagement.Convert(PixelFormat.Format24bppRgb);

    bitmap.Save("Converted RGB image_GM9.jpg");
}
And here is the output: Converted RGB image_GM9.jpg
Best regards, Eugene Kosmin. Aurigma Development Team
Ben VS  
#3 Posted : Monday, October 2, 2017 12:42:36 AM(UTC)
Ben VS

Rank: Newbie

Groups: Member
Joined: 6/3/2016(UTC)
Posts: 2

Hi Sorry, forgot to mention that we are using Graphics Mill 5.5.6.0. Our application won't compile with different versions of the Graphics Mill component so we are stuck with version 5 for now. Do you know if they is anything we can try to get this working with version 5 or is this just a limitation with this version? Thanks, Ben
Eugene Kosmin  
#4 Posted : Tuesday, October 3, 2017 5:06:57 PM(UTC)
Eugene Kosmin

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 9/19/2006(UTC)
Posts: 414

Was thanked: 14 time(s) in 14 post(s)
My Photoshop CS6 gives me a warning about invalid ICC profile when I open the original image. Maybe this is a cause of the problem. Since the 6x versions, color management workflow was significantly changed, and I guess that's why the image can be handled with elder versions. I don't think there is something you can do with GM 5. The version you have is the latest 5x. And I'm not sure how did you get your result. When I tried to run the code with GM5, I got CMInappropriateProfileException without any output.
Best regards, Eugene Kosmin. Aurigma Development Team
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.