[NTG-context] shrink JPGs to some resolution (dpi) ?

Aditya Mahajan adityam at umich.edu
Mon Mar 9 22:47:44 CET 2015


> Hi,
>
> is it possible that context (lua?) will "shrink" all \externalfigure jpegs
> automatically to some specified dpi resolution and quality
> (e.g. 300 dpi with 95% jpeg 'quality' for print and
> 100 dpi and 75% for screen quality) ?
>
> [....]
>
> any hints to read the original large JPGs, but only write "print quality" 300dpi images,
> or low quaity 75dpi images for speed (and saving net bandwidth when mailing PDFs
> to co-workers of the group)?

Why not eliminate the orignal high quality jpegs altogether? Use 
imagemagick or your favorite photo batch processor to convert all the high 
quality jpegs to low quality jpegs.

Say you have directories images/print that contain 300dpi images and 
images/screen that contain 100dpi images. Then you can use:

\setupexternalfigures
     [directory={images/print}]

\startmode[screen]
\setupexternalfigures
     [directory={images/screen}]
\stopmode

Run with context --mode=screen to get low-resolution images.

Aditya


More information about the ntg-context mailing list