Partial success:

I haven't been able to convert the images to jpg proper, but I've been at least 
been able to enable jpeg compression, thus making the resulting pdfs much 
smaller:

% enable compression for tiffs
\startluacode
local function compress(oldname, newname, compression)
    if not compression or compression == "" then
        compression = "jpeg"
    end
    os.execute(string.format(
        'gm convert -compress %s "%s" "%s"',
        compression, oldname, newname)
   )
end

-- Set the PDF and default TIFF converters to the above function.
figures.converters.tif.pdf = compress
figures.converters.tif.default = compress
\stopluacode

Best,
Denis

Von: denis.ma...@unibe.ch <denis.ma...@unibe.ch>
Gesendet: Freitag, 21. Juli 2023 13:25
An: ntg-context@ntg.nl
Betreff: [NTG-context] Convert tif to jpg (instead of pdf)

Hi,

According to the documentation, it is possible to automatically convert TIFF 
images to a format supported by LMTX via GraphicsMagick.
https://wiki.contextgarden.net/Using_Graphics#Image_Conversion

However, by default this produces pdf files which are quite huge. is it 
possible to instruct grapichsmagick to convert tiff images to jpg instead of to 
pdf ? There's an example on the linked page in the documentation, but I have to 
admit that I don't quite understand what I should do...

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

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

Reply via email to