Android: rotate image without loading it to memory

后端 未结 6 1976
梦谈多话
梦谈多话 2020-11-28 08:09

I am wondering is it possible to rotate an image stored on sdcard without loading it\'s to memory.

The reason is why I am looking for that is famous OutOfMemoryError

6条回答
  •  半阙折子戏
    2020-11-28 08:45

    If you have to handle different formats then it's going to be a pain. You'll have to be able to understand the different formats and be able to read/write/transform them, probably through streams. On a regular PC I'd say to look at ImageMagick which has very large image support. I searched for an Android port and came up with this. It might be worth a try. It looks unfinished though, so you'd probably have to do some work for better format coverage.

提交回复
热议问题