<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi Francesco,<br>
    <br>
    It might be a hack, but this works:<br>
    <br>
    with open("roche1.png", "rb") as image_file:<br>
        im1 = 'data:image/png;base64,' +
    base64.b64encode(image_file.read())<br>
    <br>
    with open("roche2.png", "rb") as image_file:<br>
        im2 = 'data:image/png;base64,' +
    base64.b64encode(image_file.read())<br>
    <br>
    s = """<table><br>
    <tr><br>
    <th><img src="%s"/></th><br>
    <th><img src="%s"/></th><br>
    </tr></table>"""%(im1, im2)<br>
    t=HTML(s)<br>
    display(t)<br>
    <br>
    <br>
    Cheers,<br>
    Zoltán<br>
    <br>
    <div class="moz-cite-prefix">On 02/09/13 15:32, Francesco Montesano
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAOCdBKKSr1LCfmZ+SFLNTM8_YNit1qo9JmdKWuw556pFeAGe9w@mail.gmail.com"
      type="cite">
      <div dir="ltr">Dear List,
        <div><br>
        </div>
        <div>I have a script that produces some image and I'm creating a
          notebook for testing/logging.</div>
        <div><br>
        </div>
        <div>For comparison reasons, I would like to load to images in a
          cell and show them side by side.</div>
        <div><br>
        </div>
        <blockquote style="margin:0px 0px 0px
          40px;border:none;padding:0px">
          <div>from IPython.display import Image</div>
          <div>
            <div>constr = Image(filename="fig1.png")</div>
          </div>
          <div>
            <div>sigma = Image(filename="fig2.png")</div>
          </div>
          <div>
            <div>display(constr, sigma)</div>
          </div>
        </blockquote>
        <div><br>
        </div>
        <div>put the figures one after the other. I've tried to play
          with the width keyword, but that does not help.</div>
        <div><br>
        </div>
        <div>Making an HTML table with the output of "Image" does not
          work (I don't know if I should add "of course")</div>
        <div><br>
        </div>
        <div>
          <div>s = """<table></div>
          <div><tr></div>
          <div><th>{f1}</th></div>
          <div><th>{f2}</th></div>
          <div></tr>""".format(f1=constr, f2=sigma)</div>
          <div>t=HTML(s)</div>
          <div>display(t)</div>
        </div>
        <div><br>
        </div>
        <div>Is there any way to do what I want directly in the
          notebook? (I guess that there is some python library to do it,
          but I think that the notebook should be able to do it)</div>
        <div><br>
        </div>
        <div>Cheers,</div>
        <div><br>
        </div>
        <div>Fra</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
IPython-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a>
<a class="moz-txt-link-freetext" href="http://mail.scipy.org/mailman/listinfo/ipython-dev">http://mail.scipy.org/mailman/listinfo/ipython-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>