Thread: embedded images
View Single Post
Old 10-24-2019, 07:54 PM   #1
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
extract embedded images

I'm looking at a book that has a dozen images, all embedded inline as base64:

<img src="data:image/jpeg;base64,/9j/.....

It slows down editing the files, and takes more space than normal images, so I'd like to convert these to binary image files.

I can copy and paste each one to a file and run a base64 decode, but is there a faster way?

PS -- found a better way, still not ideal: merged the book into a single HTML file in Sigil, extracted that and open in Firefox. I can save each image as a normal image file. Have to manually import and replace the b64 images though.

Last edited by AlanHK; 10-24-2019 at 08:20 PM.
AlanHK is offline   Reply With Quote