2

I try to display an ascii85 encoded image, like:

<img src='data:image/jpg;base85,...'/>

or

<img src='data:image/jpg;ascii85,...' />

I found several examples on base64 files, but nothing about ascii85...

What do you think?

Thanks

UnBoug
  • 167
  • 1
  • 12

2 Answers2

1

You can't do it because, as far as I know, only PostScript and PDF are able to handle ascii85 (base85). Browsers are only handling base64 for now.

If you already have data in this encoding you will need convert it to base64 before putting it into the browser.

Aleksander Wons
  • 3,611
  • 18
  • 29
0

It can be done with some javascript/typescript.

  • Have the code crawl the DOM
  • find img/@src attributes that is base85 encoded
  • write the code to decode base85 and re-encode it in base64
  • update the IMG src attribute back
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219