03-20-2009 07:04 AM
Hi all I am playing an video and I want to get snapshot of video as
byte  byteArr = videoControl.getSnapshot("encoding=rgb565");
I try to get Bitmap as
image = EncodedImage.createEncodedImage(byteArr, 0, byteArr.length);
bitmap = image.getBitmap();
but It throws an Exception as IllegalArgumentException.
I get an array of double length that of screenWidth*ScreenHeight, may be because of rgb565
How can I convert byte to Bitmap.
Solved! Go to Solution.
03-20-2009 08:37 AM
Did you try something like this...
Bitmap bitmap = Bitmap.createBitmapFromBytes( raw, 0, raw.length, 7);
03-20-2009 09:35 AM
03-23-2009 08:42 AM
I solve the problem of getting bitmap by constructing like
bitmap = new Bitmap(Bitmap.ROWWISE_16BIT_COLOR,Graphics.getScre
02-01-2011 06:41 AM
I tried using
Bitmap bitmap = new Bitmap(Bitmap.ROWWISE_16BIT_COLOR,videoControl.get
But the problem it only works if the videoControl.setDisplayWidth(w,h) is called where h is equal to any value, and w is equal to the full canvas width, if it is less even by one pixel, I get the following exception:
java.lang.IllegalArgumentException: Invalid bitmap size.