Page 1 of 1

opposite -extent or -shave

Posted: 2007-01-02T12:37:06-07:00
by rmabry
A simple thing...

I can use -extent to add pixels to the right and bottom of an image, but
what if I prefer the left and top?

convert rose: -extent 80x56 ...

This adds 10 pixels on the right and bottom.

I can get what I want with

convert rose: -rotate 180 -extent 80x56 -rotate 180 ...

but this seems horribly inefficient, as do other tricks involving compose,
draw and such. I would have thought that some -crop geometry and page
settings might do it, but I cannot figure out how.

Using -gravity with -extent would be cool, if it worked in tandem, but it
doesn't.

Also nice would be to have an inverse -shave, something like

convert rose: -shave -10x-10 ...

Anyway, what's the most efficient way to do this? (Here comes Anthony with just the one-liner I need...)

Thanks in advance,

Rick

Posted: 2007-01-02T13:06:45-07:00
by magick
Try
  • convert rose: -extent 80x56 -roll +10+10 rose.miff
to add space to the left and top of the image. In the mean-time we'll get that gravity thing you talked about working by tommorrow.

Posted: 2007-01-02T13:12:23-07:00
by rmabry
magick wrote: Try
  • convert rose: -extent 80x56 -roll +10+10 rose.miff
to add space to the left and top of the image.


Ah, yes, that's better than what I was doing. It still seems a shame that it cannot be done in one shot. These methods move things twice rather than just once, do they not? In other words, it's a shame one cannot have everything. Do you think a compose would be faster? (I guess I could try it...)

Thanks,

Rick