For tasks like this, I usually use the NetPBM utilities. They may
already be installed with your linux distribution.
pngtoppm input.png | pamscale 2.5 | ppmtopng > output.png
pngtoppm input.png | pamenlarge 2 | ppmtopng > output2.png
pngtoppm input.png | pamstretch 2 | ppmtopng > output3.png
pngtoppm input.png | pamstretch-gen 2.5 | ppmtopng > output4.png
Change the value of '2' for some other scale factor. pamenlarge and
pamstretch can only use integers, while pamscale and pamstretch-gen can
use real numbers.
On Wed, 2006-02-22 at 12:15 +0200, Sandu Crasteti wrote:
> Hello!
>
>
>
> Please, somebody help me, if possible, with an algorithm (or a pointer to
> such an algorithm) that allows saving an image in a (png, for example) file,
> with a pre-set resolution (pixels per inch), to have the possibility to
> visualize (process) a set of patterns (shapes) having the same dimensions in
> inches (millimeters), which can be represented using different numbers of
> pixels - like scanning the same image at different dpi resolutions.
>
>
>
> Best regards,
>
>
>
> Sandu Crasteti