Page 1 of 1

Screenshot using import does not print properly.

Posted: 2012-05-08T18:13:08-07:00
by kenleach
I am porting a set of scripts from Solaris to Red Hat Linux. On Solaris, we had compiled an old version of the ImageMagick import command from source. Now that we are moving to a Linux platform, we are attempting to use the default and updated ImageMagick RPM. In the script, we run the following command to capture the entire screen and print it:

import -window root -rotate 90 -page 8.5x11-0.5-0.5 gif:- | lpr -h

Using this command on Linux, the print out is mixed up. Certain parts of the screen are overlapping other parts and title bars are repeated. My first assumption is that it has to do with the geometry of the image in contrast to the dpi. If I specify a geometry (1024x768) I can get it to look correct, but it does not fill the entire paper and everything is small.

I have even tried using ps:- as the format and piping both through lp -o fitplot. Neither changed anything.

Any ideas what is going on and/or how this can be resolved? Ultimately, all I want is a print out of the entire screen, in color, which is enlarged to fill the entire 8.5x11 sheet of paper.

Any assistance would be greatly appreciated.

Thank you.
Kenneth R. Leach

Re: Screenshot using import does not print properly.

Posted: 2012-05-08T18:16:35-07:00
by anthony
Perhaps you need to remove virtual canvas information? GIF images are notoriuous for this!

Just a quick guess.

Re: Screenshot using import does not print properly.

Posted: 2012-05-08T18:23:06-07:00
by kenleach
Anthony,

Thank you for the reply. As I don't really use ImageMagick much and am basically new to it, do you have any recommendations on the syntax I should use? I will be able to play with this tomorrow.

Thank you.

Re: Screenshot using import does not print properly.

Posted: 2012-05-08T23:53:14-07:00
by anthony
The -page command is causing the GIF image to be smaller that the screen, and has negatives

What are you trying to do with it?

Also can your "lpr" take something other than gif: ?

Re: Screenshot using import does not print properly.

Posted: 2012-05-09T07:05:08-07:00
by kenleach
Anthony,

I was able to solve the problem by removing the -page option, change the gif:- to png:- and piping the output to "lp" with the "-o fitplot" option. The full command line now looks like:

import -window root -rotate 90 -frame png:- | lp -o fitplot

This produces a one page screenshot of my current display, regardless of the current display's resolution.

Thank you for your time and help. I appreciate it.

Re: Screenshot using import does not print properly.

Posted: 2012-05-10T16:44:50-07:00
by anthony
''Glad to be of Service'' -- A door in "Hitch-hikers Guide to the Galaxy" :-)