Forum: Multimedia
by Kas Ob.,
13. Feb 2024
@Michael II, Nice ! this is the right way, by changing the operation from read and write in two different places stressing the CPU cache, do it once in sequential and fast move after that perform the the local operation in one place, CPU can perform 2-3 reads and one write per cycle, but let be real, if Delphi compiler managed to spit code that perform one read in 3 cycle i consider this is a...
Forum: Multimedia
by Kas Ob.,
11. Feb 2024
That makes sense, thank you for the links.
Forum: Multimedia
by Kas Ob.,
11. Feb 2024
Found a resource might be helpful at last.
https://stackoverflow.com/questions/8554448/convert-8-bit-color-bmp-image-to-8-bit-grayscale-bmp
From the first answer, though the question and the code is to make a gray scale 8bit bitmap from colored
var entry = bmp.Palette.Entries;
var gray = (int)(0.30 * entry.R + 0.59 * entry.G + 0.11 * entry.B);
...