To access bitmap(android.graphics.Bitmap) pixels, getPixel/setPixel/setPixels/getPixels of Bitmap can be used. but, this operation is too slow, Android NDK support to access memory of bitmap directly. By this method can access memory directly, You can use other C graphic library such as gd and so on and This is very fast. Usage include file is and send "-ljnigraphics" to linker to link this libr..
Bitmap(android.graphics.Bitmap)의 픽셀단위로 처리하고 싶은 경우 getPixel/setPixel/setPixels/getPixels를 이용해야 한다. 하지만 이 처리는 java로 처리하기에는 속도가 너무 느리다. Android NDK에서는 이 처리를 위해 비트맵의 메모리에 직접 접근할 수 있는 방법을 제공하고 있다. 메모리에 직접접근이 가능하기 때문에, C로 미리 만들어진 그래픽라이브러리도 바로 사용이 가능한 장점이 있으며, 무엇보다도 빠른 속도로 처리할 수 있다. 사용법은 다음과 같다. header파일은 를 include하고 library는 jnigraphics다. 링커에게 "-lJnigraphics"를 전달해 주면 된다. 다음의 코드는 CMakeLists.txt파일을 이용할 ..
- Total
- Today
- Yesterday
- 예금
- 컴퓨트쉐이더
- 안드로이드
- 전기료
- 티스토리
- 아끼는 법
- 전기세
- 적금
- 애드핏
- 사용료
- 에어콘
- OpenGL ES
- ComputeShader
- gpgpu
- 블로그
- 에어컨
- OpenGLes
- choreographer
- Android
- texture
- 텍스처
- 컴퓨트셰이더
- TTS
- 공유 컨텍스트
- 재태크
- 금리
- 애드센스
- 재테크
- 경제보복
- 전기요금
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |