Re: [NTG-context] Which Image quality should I use ?
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. -- 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 ___
Re: [NTG-context] Which Image quality should I use ?
On Tue, 15 Jul 2014, Peter Münster wrote: There is also an old module t-degrade.tex but I don't know, if it still works with recent ConTeXt versions. It is possible to create a wrapper around t-filter to provide the functionality of t-degrade and/or grph-downsample, so that one could use: \downsample[filename][options] The main advantage is that one can use all the options of t-filter module: specify the cache directory, force reruns, etc. Let me know if there is any interest in such a wrapper. Aditya___ 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 ___
Re: [NTG-context] Which Image quality should I use ?
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 ___
Re: [NTG-context] Which Image quality should I use ?
Le samedi 12 juillet 2014, 16:14:25 Peter Münster a écrit : On Sat, Jul 12 2014, Pol Stra wrote: I think I should do something like: `convert -density 300 input.png -resize AAAxBBB output.png` but I don't know if it’s the good way to do it Hi, 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 ? 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. There is a way to include the source without duplicates images ? or which resolution is appropriate. It depends on the printer. 300dpi is often enough. ___ 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 ___
Re: [NTG-context] Which Image quality should I use ?
Am 2014-07-12 um 18:58 schrieb Pol Stra r...@hotmail.fr: I wonder, what can I do to reduce the size of those files while keeping a printable quality document? For color or greyscale pictures that are (like) photos, 150 dpi in final size is mostly enough, even for quality offset printing. „In final size“ = not scaled up If you have fine lines, like diagrams or scanned text, you might need 300 dpi. For black white lineart, you should use the resolution of your printer, but even for offset printing 800 dpi is enough (more than 1200 dpi are always nonsense). Greetlings, Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___ 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 ___
Re: [NTG-context] Which Image quality should I use ?
On 2014-07-12, 14:58, Pol Stra wrote: I wonder, what can I do to reduce the size of those files while keeping a printable quality document? Besides reducing the resolution, you can reduce the number of colours used in a PNG picture, which is called colour quantization. For example, we can differentiate between ca. 12 levels of gray (between black and white) with our eyes. So it is useless to differentiate between hundreds of different colours in a gray picture. I quantize all my gray pictures to use 12 colours only, and the difference is usually not visible, but it leads to a much smaller file size. For coloured pictures, you need of course more different colours, you have to try different values with each picture to find the best number. I use the tool pngnq for quantization. After quantization, one can further losslessy compress an image by removing unnecessary meta informations from the file, which can be done automatically with the tool Trimage. I've got both pngnq and Trimage from the repositories of my Linux distribution. Kind regards, Joshua ___ 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 ___
Re: [NTG-context] Which Image quality should I use ?
On Sat, Jul 12 2014, Pol Stra wrote: I think I should do something like: `convert -density 300 input.png -resize AAAxBBB output.png` but I don't know if it’s the good way to do it Hi, I can be done automatically for example by using this module: http://modules.contextgarden.net/grph-downsample or which resolution is appropriate. It depends on the printer. 300dpi is often enough. -- 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 ___