开发者

Android accelerated bitmap scaling

开发者 https://www.devze.com 2023-01-23 04:29 出处:网络
I have some large JPG files that need to be downsampled in an android service. BitmapFactory (i.e. skia libray) can handle this but probably does not get any GPU support. Is there any portable way to

I have some large JPG files that need to be downsampled in an android service. BitmapFactory (i.e. skia libray) can handle this but probably does not get any GPU support. Is there any portable way to get hardware acceleration for scaling ?

Could 开发者_JS百科a service create a hidden View and then use OpenGL ES to do the scaling part or is that only feasible in activities ?


You may get hardware accelerated scaling this way, but you'll have to read the result back from the GPU which may or may not be faster than just scaling in software. You will also run into GPU-specific limitations like maximum texture dimensions (4096x4096 on NexusOne for instance.)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号