Open main menu

Changes

458 bytes added ,  15:59, 16 December 2019
m
The conversion generates a PDF file with prefix <tt>m_k_i_v_</tt> and a suffix <tt>.pdf</tt> added to the name of the original file. The result is cached, and the conversion is rerun if the timestamp of the original file is newer than that of the converted file.
 
It is possible to change the converter used with the following code:
 
<context>
\startluacode
 
figures.converters["jpg"]["lowres.jpg"] =
function(oldname,newname,resolution)
os.execute(string.format(
'gm convert -density %ix%i "%s" "%s"',
resolution,resolution,oldname,newname))
end
 
\stopluacode
 
\starttext
\externalfigure
[t:/sources/hacker.jpg]
[conversion=lowres.jpg,resolution=50,width=10cm]
\stoptext
</context>
== Interaction ==
419

edits