Hi,
I've a question that is probabily driving me crazy.
I have to create an image, using bitmapextender.SetPixels starting from an array of int.
This array is created converting an array of bytes, thanx to a java routine I've wrote, where each value of byte is assigned to a int, one to one.
For example, if I have an array of bytes received from a camera that send me:
52,97,95,40,41,98,117,90,36,34,51,81,129,137,135,135,137,139,143,144
I obtain an array of int with the same numbers, of course where value >127 the conversion in int is a negative number according to http://en.wikipedia.org/wiki/Two's_complement
After using:
where Currentbitmap is a Bitmap already initialized as mutable, I obtain a visible image...that is supposed to be a grayscale image, but with a yellow tint and probabily with other problem of saturation.
My question is: with then same values, ina vb.net program on windows I see a perfect and grayscaled, luminosity balanced image, what I'm doing wrong in android world?
Let me know if you need further information.
I've a question that is probabily driving me crazy.
I have to create an image, using bitmapextender.SetPixels starting from an array of int.
This array is created converting an array of bytes, thanx to a java routine I've wrote, where each value of byte is assigned to a int, one to one.
For example, if I have an array of bytes received from a camera that send me:
52,97,95,40,41,98,117,90,36,34,51,81,129,137,135,135,137,139,143,144
I obtain an array of int with the same numbers, of course where value >127 the conversion in int is a negative number according to http://en.wikipedia.org/wiki/Two's_complement
After using:
B4X:
be.setPixels(CurrentBitmap, bufInt, 0, 640, 0,0,640,480)
where Currentbitmap is a Bitmap already initialized as mutable, I obtain a visible image...that is supposed to be a grayscale image, but with a yellow tint and probabily with other problem of saturation.
My question is: with then same values, ina vb.net program on windows I see a perfect and grayscaled, luminosity balanced image, what I'm doing wrong in android world?
Let me know if you need further information.
Last edited: