Dear @TWiStErRob, I would like to apologize if this is an inappropriate place to ask about this problem but your question on Stack Overflow is like the only place documenting this issue so I really want to ask for your opinion.
As you could have guessed, I have problem with default Android's jpeg compression which create weird artifact on final image. I could have gone for PNG compression if it is not so slow (on the Nexus 6P it takes 10-15 seconds to compress a 1080p Bitmap). So basically I have two options here:
-
Increase PNG compression performance (not really know how though, any input on this is welcome)
-
Replace Android's default JPEG compression with libjpeg-turbo as documented here, here (this one have a bit info on performance) and here. I'm not really sure if this is the way to go though as I would like to avoid using NDK as much as possible to keep the APK size small.
Thank you so much for your time.
EDIT: correct me if i'm wrong but I think Android's native JPEG compression has much better performance than PNG because it's backed by hardware. By using libjpeg-turbo, we just ditch that hardware support and fall back to an all-software route which may not be so great in performance, isn't it?