You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not a defect but an enhancement request.
While using the library I realized that a function to set 16bpp grayscale
pixels is not available and the existing SetPixel() functions in
ImageLineHelper.cs are based on an RGB model. So it doesn't work to use these
with the same values for r,g, and b.
So I wrote my own and would kindly ask to add this to the code stack after a
review by the gurus of this library.
My code is:
public static void SetPixel16bppGray(ImageLine line, int col, int gray)
{
int offset = col * line.channels;
if (line.IsInt())
{
line.Scanline[offset] = gray;
}
else
{
line.ScanlineB[offset++] = (byte)gray;
line.ScanlineB[offset] = (byte)(gray >> 8);
}
}
I hope this contribution is valuable.
Keep up the good work!
kr
Michael
Original issue reported on code.google.com by MichaelD...@gmail.com on 5 May 2015 at 1:24
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
MichaelD...@gmail.com
on 5 May 2015 at 1:24The text was updated successfully, but these errors were encountered: