Tutorial Compress png and encode to base64

TheLGL

Awesome Active Platinian
Original poster
Skilled
Feb 19, 2020
156
4,192
193
UK
For those who make Android mod menu. Instead putting the image in the assets, you can compress and encode your image into base64 and put the code instead. This saves some time

Compress png: https://compresspng.com/

Base64 encode: https://www.base64encode.org/

Java:
        byte[] decode = Base64.decode("encoded base64 here", 0);
        this.yourImageView.setImageBitmap(BitmapFactory.decodeByteArray(decode, 0, decode.length));