8/30/2023 0 Comments Delphi bitmap grayscale![]() If you are going to show that Bitmap on ImageView. Here is the end code (heavily based on the one linked) since it may help someone: public Bitmap toGrayscale(Bitmap bmpOriginal)īitmap bmpGrayscale = Bitmap.createBitmap(width, height, _8888) ĬolorMatrixColorFilter f = new ColorMatrixColorFilter(cm) Īny remarks or comments on it are very welcome. ![]() An example pixel from a JPG file has RGB 133,133,133 For your 8 bit palette, this example pixel will be palette index 133 which will have a color of. I tried Floyd-Steinberg, Stucki, Jarvis algorithms. Read the RGB value for a pixel from the 24 bit bitmap and set the palette index for the corresponding pixel in the 8 bit bitmap. I was using it wrong, thanks for pointing it out to me. Create an 8 bit bitmap and set the greyscale palette colors. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |