ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <j.hagen@xs4all.nl>
To: ntg-context@ntg.nl
Subject: Re: degrade module
Date: Thu, 14 Feb 2019 21:44:31 +0100	[thread overview]
Message-ID: <e0ebd4f0-9992-cba6-86ac-a6a78168018a@xs4all.nl> (raw)
In-Reply-To: <87lg2ikt6e.fsf@a16n.net>

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@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
___________________________________________________________________________________

  parent reply	other threads:[~2019-02-14 20:44 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-14 19:49 Lutz Haseloff
2019-02-14 20:22 ` Marco Patzer
2019-02-14 20:37   ` Peter Münster
2019-02-14 20:32 ` Peter Münster
2019-02-14 20:41   ` Wolfgang Schuster
2019-02-14 21:00     ` Peter Münster
2019-02-14 20:44   ` Hans Hagen [this message]
2019-02-15  6:56     ` Lutz Haseloff
2019-02-15  7:24       ` Henning Hraban Ramm
2019-02-15  7:25       ` Marco Patzer
2019-02-15  9:22         ` Lutz Haseloff
2019-02-15 10:08           ` Marco Patzer
2019-02-15 10:48             ` Lutz Haseloff
2019-02-15 11:23               ` Marco Patzer
2019-02-17 11:14                 ` Peter Münster
2019-02-18  9:13                   ` Marco Patzer
2019-02-18 10:03                     ` Peter Münster
2019-02-18 15:25                     ` Alan Braslau
2019-02-18 21:09                       ` Peter Münster
2019-02-18 21:23                         ` Alan Braslau
2019-02-18 22:50                           ` Peter Münster
2019-02-18 23:21                             ` Alan Braslau
2019-02-19  9:42                               ` Peter Münster

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=e0ebd4f0-9992-cba6-86ac-a6a78168018a@xs4all.nl \
    --to=j.hagen@xs4all.nl \
    --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).