Advertisement
Guest User

Untitled

a guest
Aug 26th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. jbyteArray myJByteArray = env->NewByteArray(imageToScan.cols * imageToScan.rows);
  2. env->SetByteArrayRegion(myJByteArray, 0, imageToScan.cols * imageToScan.rows, (jbyte *) imageToScan.data);
  3.  
  4. BitmapFactory.Options options = new BitmapFactory.Options();
  5. options.outHeight = height;
  6. options.outWidth = width;
  7. Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length, options);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement