On 7/15/2014 7:03 PM, Peter Münster wrote:
On Sun, Jul 13 2014, Pol Stra wrote:
I can be done automatically for example by using this module:
http://modules.contextgarden.net/grph-downsample
Thank you, it looks interesting. Is there a documentation somewhere or could
you provide an example about how to use it ?
Hi,
Here an example: http://wiki.contextgarden.net/Catalogue_raisonné
Also, it changes the resolution only at inclusion into the pdf or it does it
on original files ? My concern is to give the sources in attachment of the
document, so if I don't change those files, the document will still be huge.
The downscaled images are kept on disk in the "cache" sub-directory.
There is a way to include the source without duplicates images ?
Yes.
There is also an old module t-degrade.tex but I don't know, if it still
works with recent ConTeXt versions.
so you have several options:
- using build in
- using specific modules
built in boils down to something
\startluacode
figures.converters["png"] = {
["lowres.png"] = function(oldname,newname,resolution)
os.execute(string.format('gm convert -depth 1 "%s"
"%s"',oldname,newname))
end,
}
-- figures.suffixes["lowres.png"] = figures.suffixes.png -- suffix is
automatically done
\stopluacode
\starttext
\externalfigure[mill.png][conversion=lowres.png]
\stoptext
in nearly all our projects we get images that need to be converted
(color -> bw, downsampling, removing crap from pdf, etc) but in most
cases we also convert to pdf then because that is normally the fastest
way to include an image (which is why one can also define a prefix and
cache)
what method you choose depends on how much control you want (it's hard
to predict demands) ... btw, many of these build-in mechanism are
derived from mkii methods, where we also had resource manipulators and
so (we still have figure databases btw)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________