Red/Green/Blue/GrayScale images - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1) +--- Forum: Prolific Programmers (https://staging.qb64phoenix.com/forumdisplay.php?fid=26) +---- Forum: SMcNeill (https://staging.qb64phoenix.com/forumdisplay.php?fid=29) +---- Thread: Red/Green/Blue/GrayScale images (/showthread.php?tid=1360) |
Red/Green/Blue/GrayScale images - SMcNeill - 01-02-2023 Code: (Select All) pic = _LoadImage("Pandora.jpg", 32) RE: Red/Green/Blue/GrayScale images - SMcNeill - 01-02-2023 RE: Red/Green/Blue/GrayScale images - RhoSigma - 01-02-2023 Library Collection -> IMG-Support -> imageprocess.bm -> functions MakeGrayscale, ExtractChannels, ExtractBitfields, ShiftRGB can do same and/or similar things, but still keep it 32-bit colors. Also your grayscale seems not to take the human color perception into account (red * 0.299, green * 0.587, blue * 0.114). RE: Red/Green/Blue/GrayScale images - SMcNeill - 01-02-2023 (01-02-2023, 09:09 PM)RhoSigma Wrote: Library Collection -> IMG-Support -> imageprocess.bm -> functions MakeGrayscale, ExtractChannels, ExtractBitfields, ShiftRGB can do same and/or similar things, but still keep it 32-bit colors. I just used the built-in QB64 256-color grayscale and _RGB mapping to translate the colors over quickly and easily. |