How can I force C # to force the preservation of bitmaps that will be saved as 24-bit images, which can be seen when you get the right-click properties of an image in Windows. All saved images are set to 32-bit. I tried the code below with no luck. The original images are also 24-bit, but are always saved as 32-bit images.
ImageCodecInfo bmpCodec = FindEncoder(ImageFormat.Bmp); EncoderParameters parameters = new EncoderParameters(); parameters.Param[0] = new EncoderParameter(Encoder.ColorDepth, 24); imgCheque.Save(DestinationFile.ToString(), bmpCodec, parameters);
Images must be correctly 24 bits, as they are read by another program that cannot process 32-bit images.
Thanks in advance,
Soultech
source share