How to add text to images using CMYK ColorSpace in .NET 4

I am working on a project that includes adding text to the image, since the example given by the background image (B) and some text in the specified font, dot size and font (A), these two composites together with getting (C) : Example Image

As a result, you can start printing with these images, so the background uses the CMYK color space, and I need to save the whole process in CMYK or the colors do not look right when printing. (note: excellent article on color spaces and .NET on CodeProject )

I tried several different ways to compose these images:

  • System.Drawing implicitly converts everything to RGB
  • System.Windows.Media.Imaging - no layout methods
  • System.XAML/WPF - , RenderTargetBitmap PixelFormats.Cmyk32 ( ArgumentException).

, , , , :

.NET 4?

Edit: - - , Windows.System.Media.Imaging CMYK, , :

var bitmapConverter = new FormatConvertedBitmap();
bitmapConverter.BeginInit();
bitmapConverter.Source = sourceImage;
bitmapConverter.DestinationFormat = PixelFormats.Cmyk32;
bitmapConverter.EndInit();

, CMYK32 ( ), , ( RenderTargetBitmap ImageSource ).

+3
1

SO, , , . , , , , .

SO CMYK .NET:

RGB CMYK?

, API Windows.

SO:

CMYK RGB indesign

, CMYK RGB .

CMYK RGB:

- CMYK?

, .

+1

Source: https://habr.com/ru/post/1780049/


All Articles