简体   繁体   中英

what is the encoding mode when html converts base64 to img

I have some trouble in understanding how does html convert base64 to img From https://www.lucidchart.com/techblog/2017/10/23/base64-encoding-a-visual-explanation/ I learn how string convert to base64,but what dose it happen when base64 encoding to rgb

Base64 is a way to encode binary data as text (so it can be put anywhere you can put text, such as in an HTML attribute value).

The browser converts the Base64 data into whatever form it was in originally.

If that was a PNG it converts it back to a PNG. If it was a JPEG then a JPEG. And so on.

The browser doesn't convert the Base64 data directly to pixel values at all.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM