changes by PB to use it for embedding images in html

Hi Dario,

great package!

I was trying to use it to convert linked images in html to embedded images.

With Your original settings this does not work. I am not aware which standard Your implementation follows, however, the changes I made according to what I found in wikipedia made the whole thing work for my application.

Maybe You like to check.

Thanks again and Best Regards,

Peter


0->"A" //not "="
63->"/" //not "-"
replace trailing fillers with "="

now You can do:

raw = BinaryReadList[fn];
base64 = base64Encode[raw];
"<html><head></head><body><img src='data:image/" <> ext <> ";base64,\n" <> base64 <> "'></body></html>";

will show embedded image

specs for changes taken from wikipedia
http://de.wikipedia.org/wiki/Base64