* Scaling down the resolution of used pictures
@ 2011-06-29 14:42 Cecil Westerhof
2011-06-29 14:46 ` Martin Schröder
0 siblings, 1 reply; 10+ messages in thread
From: Cecil Westerhof @ 2011-06-29 14:42 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 699 bytes --]
At the moment it is not very important, but my other question remembered me
about an old situation.
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)?
Again, at the moment it is not urgent. But when I come in the same situation
again, it would be nice if the resulting PDF was not five times as big as
necessary. And maybe the answer is useful for someone else also. ;-}
--
Cecil Westerhof
[-- Attachment #1.2: Type: text/html, Size: 741 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Scaling down the resolution of used pictures
2011-06-29 14:42 Scaling down the resolution of used pictures Cecil Westerhof
@ 2011-06-29 14:46 ` Martin Schröder
2011-06-29 15:01 ` Cecil Westerhof
0 siblings, 1 reply; 10+ messages in thread
From: Martin Schröder @ 2011-06-29 14:46 UTC (permalink / raw)
To: mailing list for ConTeXt users
2011/6/29 Cecil Westerhof <cldwesterhof@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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Scaling down the resolution of used pictures
2011-06-29 14:46 ` Martin Schröder
@ 2011-06-29 15:01 ` Cecil Westerhof
2011-06-29 15:06 ` Henning Hraban Ramm
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Cecil Westerhof @ 2011-06-29 15:01 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 707 bytes --]
2011/6/29 Martin Schröder <martin@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
[-- Attachment #1.2: Type: text/html, Size: 992 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Scaling down the resolution of used pictures
2011-06-29 15:01 ` Cecil Westerhof
@ 2011-06-29 15:06 ` Henning Hraban Ramm
2011-06-29 15:07 ` luigi scarso
2011-06-29 17:12 ` Hans Hagen
2 siblings, 0 replies; 10+ messages in thread
From: Henning Hraban Ramm @ 2011-06-29 15:06 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Scaling down the resolution of used pictures
2011-06-29 15:01 ` Cecil Westerhof
2011-06-29 15:06 ` Henning Hraban Ramm
@ 2011-06-29 15:07 ` luigi scarso
2011-06-29 17:12 ` Hans Hagen
2 siblings, 0 replies; 10+ messages in thread
From: luigi scarso @ 2011-06-29 15:07 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Wed, Jun 29, 2011 at 5:01 PM, Cecil Westerhof <cldwesterhof@gmail.com> wrote:
> 2011/6/29 Martin Schröder <martin@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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Scaling down the resolution of used pictures
2011-06-29 15:01 ` Cecil Westerhof
2011-06-29 15:06 ` Henning Hraban Ramm
2011-06-29 15:07 ` luigi scarso
@ 2011-06-29 17:12 ` Hans Hagen
2011-06-29 17:20 ` Aditya Mahajan
2011-06-29 19:43 ` Peter Münster
2 siblings, 2 replies; 10+ messages in thread
From: Hans Hagen @ 2011-06-29 17:12 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 29-6-2011 5:01, Cecil Westerhof wrote:
> 2011/6/29 Martin Schröder<martin@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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Scaling down the resolution of used pictures
2011-06-29 17:12 ` Hans Hagen
@ 2011-06-29 17:20 ` Aditya Mahajan
2011-06-29 17:30 ` Hans Hagen
2011-06-29 19:43 ` Peter Münster
1 sibling, 1 reply; 10+ messages in thread
From: Aditya Mahajan @ 2011-06-29 17:20 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Scaling down the resolution of used pictures
2011-06-29 17:20 ` Aditya Mahajan
@ 2011-06-29 17:30 ` Hans Hagen
0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2011-06-29 17:30 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Scaling down the resolution of used pictures
2011-06-29 17:12 ` Hans Hagen
2011-06-29 17:20 ` Aditya Mahajan
@ 2011-06-29 19:43 ` Peter Münster
2011-06-29 19:53 ` Hans Hagen
1 sibling, 1 reply; 10+ messages in thread
From: Peter Münster @ 2011-06-29 19:43 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Scaling down the resolution of used pictures
2011-06-29 19:43 ` Peter Münster
@ 2011-06-29 19:53 ` Hans Hagen
0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2011-06-29 19:53 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-06-29 19:53 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-29 14:42 Scaling down the resolution of used pictures Cecil Westerhof
2011-06-29 14:46 ` Martin Schröder
2011-06-29 15:01 ` Cecil Westerhof
2011-06-29 15:06 ` Henning Hraban Ramm
2011-06-29 15:07 ` luigi scarso
2011-06-29 17:12 ` Hans Hagen
2011-06-29 17:20 ` Aditya Mahajan
2011-06-29 17:30 ` Hans Hagen
2011-06-29 19:43 ` Peter Münster
2011-06-29 19:53 ` Hans Hagen
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).