-
I'm trying to convert a JP2 image in the Rec601YCbCr colorspace to an sRGB JPEG, while also adding some white borders. Running the following command in the command line produces the result that I want. How would I replicate this in code? So far I have been unable to reproduce the extent effect without the background of the output image being pink. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
What have you tried and did not work? |
Beta Was this translation helpful? Give feedback.
-
This is the result without touching the colorspace I've done previous colour space conversions (like sRGB to CMYK) by using the SetProfile method. image.SetProfile(ColorProfile.SRGB);
image.SetProfile(ColorProfile.USWebCoatedSWOP); There is no built in profile for Rec601YCbCr, so I've downloaded an Rec601 ICC profile here. image.SetProfile(new ColorProfile(@"\icc\Rec601PAL-v4.icc"));
image.SetProfile(ColorProfile.SRGB); This gives me the white background that I want, but it also ruins the image's colours. I can send the problematic image privately, but I'm unfortunately not allowed to post it publicly. |
Beta Was this translation helpful? Give feedback.
This is the result without touching the colorspace
I've done previous colour space conversions (like sRGB to CMYK) by using the SetProfile method.
There is no built in profile for Rec601YCbCr, so I've downloaded an Rec601 ICC profile here.
This gives me the white background that I want, but it also ruins the image's colours.
I can send the problematic image privately, but I'm unfortunately not allowed to post it publicly.