Page 1 of 1

scale print size and adjust levels

Posted: 2010-08-22T08:57:45-07:00
by danjde
Hi friends,

i'm building an graphic novel and have many image scanned originary 100 dpi resolution and A3 format.

this images are gray scale scanned in different step and now i realize that have different gray tonality..

the question is:

which imagemagick command i should do for reduce the printable image to A4 format (and increase dpi proportionally) and sincronize the general gray tonality?

should i utilize the "find" command for to apply the command onto every subdirectory?..

many thanks!!

davide

Re: scale print size and adjust levels

Posted: 2010-08-22T11:06:15-07:00
by fmw42
what format are your images - PDF?

matching tone is not something in IM directly.

You can try one of my scripts, redist or histmatch, at the link below to match to some standard statistic or to match one image to another. Not sure how they will work out for your case.

mogrify will process every image (or wildcard selection) in a given level of a directory, but will not traverse the directory. see http://www.imagemagick.org/Usage/basics/#mogrify


see http://www.imagemagick.org/script/comma ... s.php#page for page dimensions in pixels.

If pdf processing, it knows about pages, see http://www.imagemagick.org/Usage/formats/#pdf

NOTE: http://www.imagemagick.org/Usage/formats/#vector

Re: scale print size and adjust levels

Posted: 2010-08-22T18:55:42-07:00
by Drarakel
danjde wrote:which imagemagick command i should do for reduce the printable image to A4 format (and increase dpi proportionally)
If you have stored your scans as TIF or JPG or something like that, then you can change the density value to 100dpi*sqrt(2) (the ratio for the DIN formats). Which would be approx. 141.42dpi.

Re: scale print size and adjust levels

Posted: 2010-08-23T03:22:49-07:00
by danjde
Drarakel wrote:If you have stored your scans as TIF or JPG or something like that, then you can change the density value to 100dpi*sqrt(2) (the ratio for the DIN formats). Which would be approx. 141.42dpi.
well, i do so, and it's perfetct for every images, thanks!

fmw42 wrote:what format are your images - PDF?
i'm buildin it on Scribus, and the originary image are tiff or png..
fmw42 wrote:matching tone is not something in IM directly.
i suppose..
fmw42 wrote:You can try one of my scripts, redist or histmatch, at the link below to match to some standard statistic or to match one image to another. Not sure how they will work out for your case.
i will try..
fmw42 wrote:mogrify will process every image (or wildcard selection) in a given level of a directory, but will not traverse the directory. see http://www.imagemagick.org/Usage/basics/#mogrify
and with the "find" command?..
fmw42 wrote:If pdf processing, it knows about pages, see http://www.imagemagick.org/Usage/formats/#pdf
yes the final output is pdf, is it better to adjust the gray tone on this final step?

many many thanks to all :-)

Re: scale print size and adjust levels

Posted: 2010-08-23T03:43:05-07:00
by danjde
..but why, if i apply mogrify to one tiff image and open it with Gimp, on the "Printable Image Size" window i see 218 pixel/in

and if i open with Gimp an png image i see 553,736 pixel/in?

thanks!

Re: scale print size and adjust levels

Posted: 2010-08-23T07:50:22-07:00
by danjde
recursive actions (into sub-directory) are possible:

http://studio.imagemagick.org/pipermail ... 20527.html

Re: scale print size and adjust levels

Posted: 2010-08-23T10:23:44-07:00
by fmw42
danjde wrote:recursive actions (into sub-directory) are possible:

http://studio.imagemagick.org/pipermail ... 20527.html
True, but not directly within mogrify. You have to use find and pipe to mogrify.

Re: scale print size and adjust levels

Posted: 2010-08-23T10:27:32-07:00
by Drarakel
Regarding the density:
You can specify the density value alone (without a units value) if the density in your input images is already stored with PixelsPerInch. If that's not the case (e.g. in PNGs, there's only PixelsPerCentimeter - or rather PixelsPerMeter - and Unspecified), or if you're not sure about that, then you should always specify the units, too.
Additionally, there can be different density values in different profiles within a file. ImageMagick does 'only' update the values in the normal header (JFIF header, pHYs chunk, etc.) and in the EXIF profile. If you don't need the metadata anymore (apart from the density), then you can get rid of most of it with "-strip".

Examples:
mogrify -units PixelsPerInch -density 141.42 -strip image.png
mogrify -set units PixelsPerInch -set density 141.42 -strip image.png
In a current ImageMagick, I would recommend the latter command, as "-units" (instead of "-set units") can be problematic in some cases. Though in your case, the effect is the same.

Of course, there are alternatives in changing only metadata - e.g. with ExifTool.