Re: help with gm mogrify
Bob Friesenhahn <[email protected]> Fri, 7 Jun 2019 07:47:41 -0500 (CDT)
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 7 Jun 2019, mick crane wrote:
> On 2019-06-07 07:52, mick crane wrote:
>>> Is some combination of "-resize -extent -gravity -size"
>> I missed out "-background"
> OK graphicsmagick website still resets but I found it in /usr/share docs so I
> think I can sort it from those pretty good instructions.
I don't know what you mean by "website still resets" but you are on
the right track that you can use the -extent option to create a fixed
size canvas to put under the image.
This is an example from the documentation:
This command reduces or expands a JPEG image to fit on
an 800x600 display:
gm convert -size 800x600 input.jpg \
-resize 800x600 -background black \
-compose Copy -gravity center \
-extent 800x600 \
-quality 92 output.jpg
The -size option improves read performance from JPEG files if the
desired size is smaller than the pixel dimensions of the JPEG.
Bob
--
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt