Simple application to print part of an image - suggestions?

Patton Echols p.echols at
Wed Mar 4 03:50:31 UTC 2009

On 03/03/2009 05:36 PM, Matthew Flaschen wrote:
>  Robert Parker wrote:
> > On Wed, Mar 4, 2009 at 1:53 AM, Chris G <cl at> wrote:
> >> A couple of times recently I have wanted to print just part of an
> >>  image (.jpg) and, as far as I can see, none of the applications
> >> I seem to have installed on my xubuntu lets me do this.
> >>
> >> I just want to view the image, select a bit of it with a marquee
> >> and then print.  I guess the Gimp will do it but it's a bit OTT
> >> just for printing something.
> >
> > sudo apt-get install imagemagick
> >
> > It's a suite of image processing programs. To select part of an
> > image you probably want convert so 'man convert'
>  Yes, in particular look at the -crop option.

Certainly, but the command would be something like this:

convert rose.gif -crop 40x30+10+10  +repage  name.gif

where "rose.gif" is the original image, "40x30" is the pixels size to be 
cropped, +10+10 is the offset telling the command the offset in the 
image to position the crop +repage is so that the command reduces the 
"canvas" to the cropped size and "name.gif" is the name of the resulting 

>  Also, you can have convert output to postscript and pipe directly to
>  a2ps or lpr for the actual print. 

Yup, and the command above would be modified to do that. (Sorry, I don't 
know how to pipe to a printer)  But what OP would need to know the 
dimensions of the original image, the dimensions of the crop and the 
dimensions of the  offset.   Pretty sure that is not what was asked for.

>  Just don't use good paper while
>  you're testing. :)

True, before you send to print, you can see the result with "display" 
which is also part of the IM suite like this:

convert rose.gif -crop 40x30+10+10  +repage  - | display -

(hint - "q" to quit the display window, right click for options)



More information about the ubuntu-users mailing list