Bitmap.compress png 8-bit palette

I play with sending some images via a bluetooth link to an embedded device. The device speaks and decodes PNG for images, but it seems that some of the messages are getting too large for cable transfers at a reasonable data rate / size.

I am currently using Bitmap.compress(Bitmap.Compression.PNG, 0, <ByteArrayOutputStream>) to get an array of bytes for compressed data.

Is it possible to somehow make Bitmap.compress() unprofitable with colors. And in this case, Bitmap.compress has ever used the 256 color mode on its own, given the image with the appropriate number of colors.

+4
source share

Source: https://habr.com/ru/post/1498771/


All Articles