ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: luigi scarso <luigi.scarso@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: base64 encoded inline images
Date: Fri, 28 Oct 2016 14:26:07 +0200	[thread overview]
Message-ID: <CAG5iGsD=4+pD5JKxtj2jf-wfX3xQbSTjcx5ue49+gaNFLg+HnQ@mail.gmail.com> (raw)
In-Reply-To: <05F0C571-9140-467C-8218-8E8DEC8844AA@fiee.net>

On Fri, Oct 28, 2016 at 1:46 PM, Henning Hraban Ramm <texml@fiee.net> wrote:
> Hi,
> can ConTeXt handle base64 encoded inline images, and how?
>
> I'm trying to process some HTML files that contain those. Makes not a lot of sense, but if ConTeXt can handle them, I don’t need to extract them as files.
>
> Greetlings, Hraban
> ---
> http://www.fiee.net
> http://wiki.contextgarden.net
> https://www.cacert.org (I'm an assurer)
> GPG Key ID 1C9B22FD
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

we have the mime library of luasocket that can encode/decode Base64

\starttext
\startluacode
for k,v in pairs(mime) do context(k .. ":~" ..tostring(v)) ; context.par()  end
\stopluacode
OK
\stoptext

see the source at
luasocket/doc/reference.html


If the image is a bitmap, see

doc/context/tests/mkiv/graphics/bitmap-001.tex
doc/context/tests/mkiv/graphics/bitmap-002.tex
of
http://www.pragma-ade.nl/context/latest/cont-tst.7z


-- 
luigi
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2016-10-28 12:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-28 11:46 Henning Hraban Ramm
2016-10-28 12:26 ` luigi scarso [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAG5iGsD=4+pD5JKxtj2jf-wfX3xQbSTjcx5ue49+gaNFLg+HnQ@mail.gmail.com' \
    --to=luigi.scarso@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).