-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Whether I use QOIUtil.readFile vs BitmapFactory.decodeFile of Android, or I use QOIUtil.readImage vs BitmapFactory.decodeStream , it seems that Android's implementation is faster to parse PNG files over QOI:
From inputStream of the resource (files are within the app) :
QOI took 84 ms
PNG took 25 ms
From a file outside the app:
QOI took 36 ms
PNG took 30 ms
And that's before getting Bitmap instance out of the QOIImage instance, which I don't understand how to do.
Tested on Pixel 4 with Android API 32 on the "wikipedia_008" image files, from here (got from here) :
https://qoiformat.org/qoi_test_images.zip
See attached project:
How could it be?
Is there anything that can be improved in the implementation?
And how do you convert the output of the function to a working Bitmap instance?