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

Notification

Icon
Error

#color-management

Options
Go to last post Go to first unread
AlexAseev  
#1 Posted : Monday, May 8, 2017 6:50:56 AM(UTC)
AlexAseev

Rank: Newbie

Groups: Member
Joined: 5/8/2017(UTC)
Posts: 5

Hi All,
using latest 9.1.5 version trying to convert from RGB to Grayscale 8bit using colormanagement , and apply Grayscale ICC profile But I'm getting the exception. Please advice what is wrong, and how to reach the required?

Code:
 
img.ColorManagement.ColorManagementEngine= ColorManagementEngine.LittleCms;
if (img.ColorProfile == null)
     img.ColorProfile = new ColorProfile("AdobeRGB1998.icc");
img.ColorManagement.DestinationProfile = new ColorProfile("dot_grain20.icc");
img.ColorManagement.Convert(PixelFormat.Format8bppGrayscale);


---->
The profile doesn't match to color space required.
at Aurigma.GraphicsMill.GMException.ThrowManagedException(IntPtr unmanagedException)
в Aurigma.GraphicsMill.PipelineElement.RunPipeline()
в Aurigma.GraphicsMill.Pipeline.Run()
в Aurigma.GraphicsMill.ColorManagementProvider.Apply()
Profiles.zip (2kb) downloaded 2 time(s).

Edited by user Monday, May 8, 2017 6:58:35 AM(UTC)  | Reason: formatting

Fedor  
#2 Posted : Monday, May 8, 2017 9:26:48 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,572

Thanks: 5 times
Was thanked: 64 time(s) in 63 post(s)
I successfully converted RGB to CMYK using the attached color profiles:

Code:
var img = new Bitmap("../../../Chicago.jpg");

img.ColorManagement.ColorManagementEngine = ColorManagementEngine.LittleCms;
if (img.ColorProfile == null)
    img.ColorProfile = new ColorProfile("../../../AdobeRGB1998.icc");
img.ColorManagement.DestinationProfile = new ColorProfile("../../../dot_grain20.icc");
img.ColorManagement.Convert(PixelFormat.Format8bppGrayscale);

img.Save("../../../Chicago_gray.jpg");


Are you sure that the bitmap (img) has the RGB color space?

Chicago_gray.jpg

Chicago.jpg

Edited by user Monday, May 8, 2017 9:30:16 AM(UTC)  | Reason: Not specified

Best regards,
Fedor Skvortsov
AlexAseev  
#3 Posted : Tuesday, May 9, 2017 8:08:50 AM(UTC)
AlexAseev

Rank: Newbie

Groups: Member
Joined: 5/8/2017(UTC)
Posts: 5

it appeared to be my bug, i really had greyascale as input
thanks for help
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.