*int array to byte array
--As Brian says, you need to work out how what sort of conversion you need.
https://stackoverflow.com/questions/1086054/how-to-convert-int-to-byte
How to convert int[] to byte[]
I have an array of integers which represent a RGB image and would like to convert it to a byte array and save it to a file. What's the best way to convert an array of integers to the array of byte...
stackoverflow.com
//int[] to byte[]
ByteBuffer byteBuffer = ByteBuffer.allocate(bgra.length * 4);
IntBuffer intBuffer = byteBuffer.asIntBuffer();
intBuffer.put(bgra);
byte[] array = byteBuffer.array();
return array;
https://forum.processing.org/one/topic/how-to-convert-image-to-byte-array.html
how to convert image to byte array ? - Processing Forum
hi, how to convert image to byte array ? and I find the RGB colors?
forum.processing.org
'+)기록 > 과제' 카테고리의 다른 글
정리사항 34 - 스레드 동기화 (0) | 2023.03.21 |
---|---|
정리사항 33 - (적용)NV21 to RGB -> intArray to byteArray -> BGR / byteArray to intArray (0) | 2023.03.20 |
정리사항 31 - NV21이미지 회전 (0) | 2023.03.16 |
정리사항 30 - 스레드, 핸들러 / 바이트배열 -> 비트맵 / NV21 회전 (0) | 2023.03.15 |
정리사항 29 - OpenCV 설치(참고용) (0) | 2023.03.14 |