Free Support Forum -

Pre-sales question about Aspose.Imaging

Hello, here are my requirements. Please let me know if I could use Aspose.Imaging for the following:
Determine whether an image is CMYK, RGB, or Grayscale. If it is CMYK, convert it to RGB. If it is Grayscale, convert it to Black and White.


We are investigating the requirements shared and will share the feedback with you as soon as possible.


We have investigated your requirements and details and suggest following for your conveience:

  1. In order to get known color model of the image, please try following code:

      using (RasterImage image = (RasterImage)Image.Load(@"c:\Users\USER\Downloads\image_2020_12_14T11_12_06_553Z___.jpg"))
         Aspose.Imaging.RasterImage rasterImage = (Aspose.Imaging.RasterImage)image;
         Aspose.Imaging.RawDataSettings settings = rasterImage.RawDataSettings;
  2. In order to save to the specified color scheme you can please try following code:

                       // CMYK jpeg
         image.Save("result.jpg", new JpegOptions() { ColorType = JpegCompressionColorMode.Cmyk });
         // Grayscale png
         image.Save("result.png", new PngOptions() { ColorType = PngColorType.Grayscale });
         // CMYK tiff
         image.Save(“result.tiff”, new TiffOptions(Aspose.Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.TiffLzwCmyk));

Actually, related to other color schemes, we can not do it in common way, because it is format specific, but using image options in format specific way can give you what exactly you require.