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
scale print size and adjust levels
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: scale print size and adjust levels
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
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
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.danjde wrote:which imagemagick command i should do for reduce the printable image to A4 format (and increase dpi proportionally)
Re: scale print size and adjust levels
well, i do so, and it's perfetct for every images, thanks!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.
i'm buildin it on Scribus, and the originary image are tiff or png..fmw42 wrote:what format are your images - PDF?
i suppose..fmw42 wrote:matching tone is not something in IM directly.
i will try..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.
and with the "find" command?..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
yes the final output is pdf, is it better to adjust the gray tone on this final step?fmw42 wrote:If pdf processing, it knows about pages, see http://www.imagemagick.org/Usage/formats/#pdf
many many thanks to all

Re: scale print size and adjust levels
..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!
and if i open with Gimp an png image i see 553,736 pixel/in?
thanks!
Re: scale print size and adjust levels
recursive actions (into sub-directory) are possible:
http://studio.imagemagick.org/pipermail ... 20527.html
http://studio.imagemagick.org/pipermail ... 20527.html
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: scale print size and adjust levels
True, but not directly within mogrify. You have to use find and pipe to mogrify.danjde wrote:recursive actions (into sub-directory) are possible:
http://studio.imagemagick.org/pipermail ... 20527.html
Re: scale print size and adjust levels
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.
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.