Log in or register to post comments

Convert Camera Image to Bitmap

December 28, 2011 - 6:08pm #1

Hello All,
I want to develop some application to decode QRCode in android.
I use unity 3 Extension from Qualcomm to call camera device.
I got the results from Qualcomm direct image of the background scene, now I want to process the results for the detection of a QRCode, so I have to convert the image into the Bitmap. Bitmap that I mean here is a bitmap of System.Drawing. Because I am use C #. From Qualcomm cameranya I just get a byte array of the camera. So i need to convert into bitmaps.
I've tried using:

Quote:

File.WriteAllBytes("/sdcard/file.jpg", varbyte);

but the android I get an empty result.
Or there is alternative to save camera result into file, I try use bitmap factory in unity, but my script not running in android ?

Please help me,

Regards,

Re: Convert Camera Image to Bitmap

December 28, 2011 - 8:58pm #2

http://answers.unity3d.com/questions/26576/why-is-the-systemdrawing-namespace-not-supported-i.html

I'm not sure what the best approach is, have you tried asking in the Unity forums?

You may be able to pass the byte array to an Android Java plugin that can create the bitmap for you. See the "Using Java Plugins" section of the Unity Plugins guide: http://unity3d.com/support/documentation/Manual/Plugins.html

- Kim

Log in or register to post comments