ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Peter Münster" <pmlists@free.fr>
To: ntg-context@ntg.nl
Subject: Re: shrink JPGs to some resolution (dpi) ?
Date: Tue, 10 Mar 2015 10:08:07 +0100	[thread overview]
Message-ID: <87385ddxu0.fsf@free.fr> (raw)
In-Reply-To: <20150310074333.GA12997@hl.fritz.box> (Harald Koenig's message of "Tue, 10 Mar 2015 08:43:33 +0100")

On Tue, Mar 10 2015, Harald Koenig wrote:

> but how do I use it ?

- Copy grph-downsample.lua to
  .../context/tex/texmf-local/tex/context/third/grph-downsample/grph-downsample.lua

- context --generate

- Copy hacker.jpg to your directory.

- Write this to test.tex:

--8<---------------cut here---------------start------------->8---
\loadluafile[grph-downsample]
\setupexternalfigures[conversion=lowres.jpg, resolution=10]
\starttext
\externalfigure[hacker.jpg][width=5cm]
\stoptext
--8<---------------cut here---------------end--------------->8---

- Then: "context test" (I hope it works...)

- Perhaps wikify it.


>     first-setup.sh --modules="grph-downsample"
>
> which removed the unzipped module:-(

Unfortunately, grph-downsample is not in the context-suite.
Mojca, could you add it?


> what's the "real way" here ?

For now, you have to put it to texmf-local.


> next problem: how to use your module ?  
> I can't find the docs and just a 
>
>   \usemodule[grph-downsample]

\loadluafile seems to do the trick, but perhaps there is an official
"context-way", Hans?


> btw, I've added your suggested patch to grph-inc.lua

The patch is only needed, when you change the size of the image, for
example 5cm -> 6cm. Without the patch, the down-sampled file won't be
regenerated.

-- 
           Peter
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2015-03-10  9:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09 21:12 Harald Koenig
2015-03-09 21:47 ` Aditya Mahajan
2015-03-09 23:33   ` Harald Koenig
2015-03-10  0:05     ` Hans Hagen
2015-03-09 21:50 ` Alan BRASLAU
2015-03-09 22:10   ` luigi scarso
2015-03-09 22:25   ` Hans Hagen
2015-03-09 23:18     ` Harald Koenig
2015-03-10  0:17       ` Hans Hagen
2015-03-10  1:33         ` Harald Koenig
2015-03-10  6:34           ` Henning Hraban Ramm
2015-03-10 11:12           ` Hans Hagen
2015-03-09 21:54 ` Pablo Rodriguez
2015-03-10  6:44 ` Peter Münster
2015-03-10  7:43   ` Harald Koenig
2015-03-10  9:08     ` Peter Münster [this message]

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=87385ddxu0.fsf@free.fr \
    --to=pmlists@free.fr \
    --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).