Example #1
0
        public void compress(Bitmap.CompressFormat format, int quality, ByteArrayOutputStream stream)
        {
            JNIFind();

            if (_instance == IntPtr.Zero)
            {
                Debug.LogError("_instance is not initialized");
                return;
            }
            if (_jmCompress == IntPtr.Zero)
            {
                Debug.LogError("_jmCompress is not initialized");
                return;
            }
            AndroidJNI.CallVoidMethod(_instance, _jmCompress, new jvalue[] { new jvalue()
                                                                             {
                                                                                 l = format.Instance
                                                                             }, new jvalue()
                                                                             {
                                                                                 i = quality
                                                                             }, new jvalue()
                                                                             {
                                                                                 l = stream.GetInstance()
                                                                             } });
        }