From mboxrd@z Thu Jan 1 00:00:00 1970 From: Noah Hoffman Subject: embed base64 encoded images in exported html Date: Mon, 23 Apr 2012 10:33:24 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMN93-0003ZL-7n for emacs-orgmode@gnu.org; Mon, 23 Apr 2012 13:33:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SMN91-0003Ku-FZ for emacs-orgmode@gnu.org; Mon, 23 Apr 2012 13:33:48 -0400 Received: from mail-vb0-f41.google.com ([209.85.212.41]:47348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SMN91-0003KQ-9P for emacs-orgmode@gnu.org; Mon, 23 Apr 2012 13:33:47 -0400 Received: by vbbey12 with SMTP id ey12so10213285vbb.0 for ; Mon, 23 Apr 2012 10:33:44 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hello - I am trying to export a monolithic html file by embedding base64-encoded images, and I can't quite figure out how to prevent the output from being escaped in one way or another... here's an example of one permutation that doesn't do exactly what I want: #+BEGIN_SRC R :results output png('plot.png') plot(1:10) invisible(dev.off()) list.files(pattern = '*.png') #+END_SRC #+RESULTS: : [1] "plot.png" #+BEGIN_SRC python :results output raw :exports results with open('plot.png', 'rb') as image: data = image.read() print '' % data.encode("base64") #+END_SRC #+RESULTS: