Rank: Newbie
Groups: Guest
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 3 time(s).Edited by user Monday, May 8, 2017 6:58:35 AM(UTC)
| Reason: formatting
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 7/28/2003(UTC) Posts: 1,660
Thanks: 5 times Was thanked: 76 time(s) in 74 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?
Edited by user Monday, May 8, 2017 9:30:16 AM(UTC)
| Reason: Not specified |
Best regards, Fedor Skvortsov
|
|
|
|
Rank: Newbie
Groups: Guest
Joined: 5/8/2017(UTC) Posts: 5
|
it appeared to be my bug, i really had greyascale as input thanks for help
|
|
|
|
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.