Re: [NTG-context] Scaling down the resolution of used pictures
2011/6/29 Cecil Westerhof cldwester...@gmail.com: I do not use graphics a lot in my ConTeXt files. But some time ago I used several pictures with a very high resolution. This made the resulting PDF very big. I did not expect the PDF printed on a printer with a higher resolution as 1200 DPI. Is there a way to have the included graphics not be bigger as necessary (without changing the original pictures)? Use a program for image manipulation, e.g. ImageMagick. Best Martin ___ 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] Scaling down the resolution of used pictures
2011/6/29 Martin Schröder mar...@oneiros.de I do not use graphics a lot in my ConTeXt files. But some time ago I used several pictures with a very high resolution. This made the resulting PDF very big. I did not expect the PDF printed on a printer with a higher resolution as 1200 DPI. Is there a way to have the included graphics not be bigger as necessary (without changing the original pictures)? Use a program for image manipulation, e.g. ImageMagick. That would be a possibility, but I was wondering if there was a way to let ConTeXt do it. Saves a lot of time. Also: when changing from A4 to A5, you have to do it all over again. -- Cecil Westerhof ___ 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] Scaling down the resolution of used pictures
Am 2011-06-29 um 17:01 schrieb Cecil Westerhof: That would be a possibility, but I was wondering if there was a way to let ConTeXt do it. Saves a lot of time. There once was t-degrade module: http://modules.contextgarden.net/t-degrade I guess the modern way would be using t-filter: http://modules.contextgarden.net/filter Greetlings from Lake Constance! 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] Scaling down the resolution of used pictures
On Wed, Jun 29, 2011 at 5:01 PM, Cecil Westerhof cldwester...@gmail.com wrote: 2011/6/29 Martin Schröder mar...@oneiros.de I do not use graphics a lot in my ConTeXt files. But some time ago I used several pictures with a very high resolution. This made the resulting PDF very big. I did not expect the PDF printed on a printer with a higher resolution as 1200 DPI. Is there a way to have the included graphics not be bigger as necessary (without changing the original pictures)? Use a program for image manipulation, e.g. ImageMagick. That would be a possibility, but I was wondering if there was a way to let ConTeXt do it. still not without an external program, but I hope for Porquerolles. -- luigi ___ 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] Scaling down the resolution of used pictures
On 29-6-2011 5:01, Cecil Westerhof wrote: 2011/6/29 Martin Schrödermar...@oneiros.de I do not use graphics a lot in my ConTeXt files. But some time ago I used several pictures with a very high resolution. This made the resulting PDF very big. I did not expect the PDF printed on a printer with a higher resolution as 1200 DPI. Is there a way to have the included graphics not be bigger as necessary (without changing the original pictures)? Use a program for image manipulation, e.g. ImageMagick. That would be a possibility, but I was wondering if there was a way to let ConTeXt do it. Saves a lot of time. Also: when changing from A4 to A5, you have to do it all over again. You can plugin in a converter. However, it only works for one to anothe format so you need to patch a line in grph-inc.lua: line 416: local converter = (newformat ~= format or resolution) and converters[format] (I'll figure out something better for this so it's a temp hack.) Such a plugin looks like: \startluacode figures.converters.png = { png = function(oldname,newname,resolution) local command = string.format('gm convert -depth 1 %s %s',oldname,newname) logs.report(string.format(running command %s,command)) os.execute(command) end } \stopluacode \externalfigure[mill.png][resolution=lowres,conversion=png] 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] Scaling down the resolution of used pictures
On Wed, 29 Jun 2011, Hans Hagen wrote: Such a plugin looks like: \startluacode figures.converters.png = { png = function(oldname,newname,resolution) local command = string.format('gm convert -depth 1 %s %s',oldname,newname) logs.report(string.format(running command %s,command)) os.execute(command) end } \stopluacode Don't you need to use 'resolution' somewhere in the function? \externalfigure[mill.png][resolution=lowres,conversion=png] 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] Scaling down the resolution of used pictures
On 29-6-2011 7:20, Aditya Mahajan wrote: On Wed, 29 Jun 2011, Hans Hagen wrote: Such a plugin looks like: \startluacode figures.converters.png = { png = function(oldname,newname,resolution) local command = string.format('gm convert -depth 1 %s %s',oldname,newname) logs.report(string.format(running command %s,command)) os.execute(command) end } \stopluacode Don't you need to use 'resolution' somewhere in the function? Well, not 'need' but it would make sense of course to use that info, for instance to set the depth or resolution but I wasn't in the mood for studying the man pages (and I always forget the command line arguments), so I leave that 'as an exercise for the reader'. 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] Scaling down the resolution of used pictures
On Wed, Jun 29 2011, Hans Hagen wrote: That would be a possibility, but I was wondering if there was a way to let ConTeXt do it. Saves a lot of time. Also: when changing from A4 to A5, you have to do it all over again. You can plugin in a converter. However, it only works for one to anothe format so you need to patch a line in grph-inc.lua: Could img.copy() help here perhaps? -- 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] Scaling down the resolution of used pictures
On 29-6-2011 9:43, Peter Münster wrote: On Wed, Jun 29 2011, Hans Hagen wrote: That would be a possibility, but I was wondering if there was a way to let ConTeXt do it. Saves a lot of time. Also: when changing from A4 to A5, you have to do it all over again. You can plugin in a converter. However, it only works for one to anothe format so you need to patch a line in grph-inc.lua: Could img.copy() help here perhaps? that's unrelated, 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 ___