can we print images in DPI and proper size using imagemagick

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Ravinderjit S.Sidhu

can we print images in DPI and proper size using imagemagick

Post by Ravinderjit S.Sidhu »

Dear friends,

can we print images in DPI and proper size using imagemagick?
like BMP/JPG in 300 dpi

I know IMDisplay.exe of imagemagick that can print but this does not appears to print in proper DPI or proper size of image (CM/INCH).

If you know how to print images properly using command line or using imagemagick any other way, please suggest.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: can we print images in DPI and proper size using imagemagick

Post by Bonzo »

Try something like this:
Setting the size in resize to print an image 6"x4"



The sizes used in ImageMagick are in pixels; to get an image into a size for printing e.g. 6"x4" you need to do something like this:

<?php
exec("convert input.jpg -resize 600x400 -density 100x100 output.jpg");
?>
The default pixel value in ImageMagick is DPI ( dots per inch ) so that will not need setting.
The -density sets the pixels per inch; you can have a different value for the height and width if required
The values in -resize are set by multiplying the required size by the DPI:
6 x 100 = 600 and 4 x 100 = 400
If you were working on 300 dpi it would be 6 x 300 = 1800 and 4 x 300 = 1200
Ravinderjit S.Sidhu

can we take printout in DPI and proper size using imagemagic

Post by Ravinderjit S.Sidhu »

actually i have images generated by convert.exe command line.
these images are in 300 dpi and proper size of 4"x5".

I am looking for how to print these images on laser/inkjet printer in proper printmedia qality using imagemagick.
Ravinderjit S.Sidhu

Re: can we take printout in DPI and proper size using imagemagic

Post by Ravinderjit S.Sidhu »

Ravinderjit S.Sidhu wrote:actually i have images generated by convert.exe command line.
these images are in 300 dpi and proper size of 4"x5".

I am looking for how to print these images on laser/inkjet printer in proper printmedia qality using imagemagick.
I found that when we set printer-driver dpi same as the dpi of image (like printer dpi is 600 and image is also of 600 dpi) then it prints in proper size. (using imagemagick imdisplay.exe)
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: can we print images in DPI and proper size using imagemagick

Post by anthony »

Command line example?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Ravinderjit S.Sidhu

Re: can we print images in DPI and proper size using imagemagick

Post by Ravinderjit S.Sidhu »

I tried using IMDisplay.exe to print image on printer...This is GUI based...no command line i used for this.

But I am looking for comand line for quality dpi printing in real size to laser printer.
Post Reply