[NTG-context] degrade module

Lutz Haseloff lutz.haseloff at toppkieker.info
Fri Feb 15 07:56:31 CET 2019


Thank you all for your help.

First i tried the grph-downsample.lua script.
Unfortunately i get an error message
grph-downsample.lua:31: bad argument #2 to 'format' (number has no integer representation)
See attached log file.

Greetings Lutz

Am 14. Februar 2019 21:44:31 MEZ schrieb Hans Hagen <j.hagen at xs4all.nl>:
>On 2/14/2019 9:32 PM, Peter M√ľnster wrote:
>> On Thu, Feb 14 2019, Lutz Haseloff wrote:
>> 
>>> I wanted to use the degrade module with recent ConTeXt and LuaTeX.
>> 
>> Hi Lutz,
>> 
>> Could you please check, if the module grph-downsample.lua could fit
>your
>> needs?
>> 
>> 
>>> The minimal example from the degrade manual gives an error.
>>> See the attached log.
>>> Is there any chance to get the module working again?
>> 
>> There is always a chance. The question is just: who will afford the
>> efforts...
>> Please check first the downsample module, and then let's see, if you
>> still need this very old and hackish degrade module.
>you can plug in code
>
>\startluacode
>
>figures.converters["png"]["lowres.png"] = 
>function(oldname,newname,resolution)
>     os.execute(string.format('gm convert "%s" "%s"',oldname,newname))
>end
>
>figures.converters["jpg"]["lowres.jpg"] = 
>function(oldname,newname,resolution)
>     os.execute(string.format('gm convert "%s" "%s"',oldname,newname))
>end
>
>-- figures.suffixes["lowres.png"] = figures.suffixes.png -- suffix is 
>automatically done
>
>\stopluacode
>\enabletrackers[graphics*]
>
>
>\starttext
>     \externalfigure[t:/sources/mill.png][conversion=lowres.png]
>     \externalfigure[t:/sources/hacker.jpg][conversion=lowres.jpg]
>\stoptext
>
>
>
>-----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
>-----------------------------------------------------------------
>___________________________________________________________________________________
>If your question is of interest to others as well, please add an entry
>to the Wiki!
>
>maillist : ntg-context at 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
>___________________________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20190215/a69a6be7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: verkleinert-downsample.log
Type: application/octet-stream
Size: 6727 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20190215/a69a6be7/attachment-0001.obj>


More information about the ntg-context mailing list