ot2#28553
Is it possible to have a greyscaling-function that greyscales all types of images regardless of format ( I guess pdf won't work ). And in addition preserve any transparancy for images that contain this information. It is also important to preserve metainfo/keywords in the image (if present).
I tried your sample-code:
and changed the pixelformat to grayscale, but all i get is "UnsupportedPixelFormatException", and I get that also when using 1bppIndexed as in your sample...
I tried your sample-code:
using (var reader = ImageReader.Create("../../../../_Input/Copenhagen_RGB.jpg"))
using (var converter = new ColorConverter(PixelFormat.Format1bppIndexed))
using (var writer = ImageWriter.Create("../../../../_Output/PF_ConvertToBlackAndWhiteMemoryFriendly.png"))
{
Pipeline.Run(reader + converter + writer);
}and changed the pixelformat to grayscale, but all i get is "UnsupportedPixelFormatException", and I get that also when using 1bppIndexed as in your sample...