The problem I face is that the images embedded in a html document are
corrupted. This happens for all lines that contain 4 pluses, they are
converted to one plus.
This would be the correct line:
v+4gNDiF/pkN6IsbQNdnXdijUpnpmYGUqPOjqO/uJfWzI8i8hWmafOxjH+P++++vWFeci0ulYBgG
And this is what would be in the html doc:
v+4gNDiF/pkN6IsbQNdnXdijUpnpmYGUqPOjqO/uJfWzI8i8hWmafOxjH+P+vWFeci0ulYBgG
I have traced it to the html11.conf:
For 8.6.8 is working:
[image-inlinemacro]
<span class="image{role? {role}}">
<a class="image" href="{link}">
{data-uri%}<img src="{imagesdir=}{imagesdir?/}{target}"
alt="{alt={target}}"{width? width="{width}"}{height?
height="{height}"}{title? title="{title}"} />
{data-uri#}<img alt="{alt={target}}"{width? width="{width}"}{height?
height="{height}"}{title? title="{title}"}
src="data:image/{eval:os.path.splitext(r'{target}')[1][1:]};base64,
{data-uri#}{sys3:"{python}" -u -c "import base64,sys;
base64.encode(sys.stdin,sys.stdout)" <
"{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}" />
{link#}</a>
</span>
For 8.6.9 is not working:
[image-inlinemacro]
<span class="image{role? {role}}">
<a class="image" href="{link}">
{data-uri%}<img src="{imagesdir=}{imagesdir?/}{target}"
alt="{alt={target}}"{width? width="{width}"}{height?
height="{height}"}{title? title="{title}"} />
{data-uri#}<img alt="{alt={target}}"{width? width="{width}"}{height?
height="{height}"}{title? title="{title}"}
{data-uri#}{sys:"{python}" -u -c "import mimetypes,base64,sys; print
'src=\"data:'+mimetypes.guess_type(r'{target}')[0]+';base64,';
base64.encode(sys.stdin,sys.stdout)" <
"{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}" />
{link#}</a>
</span>
After playing around a bit I cam up with this working config:
[image-inlinemacro]
<span class="image{role? {role}}">
<a class="image" href="{link}">
{data-uri%}<img src="{imagesdir=}{imagesdir?/}{target}"
alt="{alt={target}}"{width? width="{width}"}{height?
height="{height}"}{title? title="{title}"} />
{data-uri#}<img alt="{alt={target}}"{width? width="{width}"}{height?
height="{height}"}{title? title="{title}"}
{data-uri#}{sys:"{python}" -u -c "import mimetypes,sys; print
'src=\"data:'+mimetypes.guess_type(r'{target}')[0]+';base64,';"}
{data-uri#}{sys3:"{python}" -u -c "import base64,sys;
base64.encode(sys.stdin,sys.stdout)" <
"{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}" />
{link#}</a>
</span>
My guess is that the sys3 is some special attribute that prevents certain
post processing of the encoded data.
Hope that this provides enough info for you.
Thanks,
Peter
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/asciidoc.
For more options, visit https://groups.google.com/d/optout.