GraphicsMagick V1.3.35 x86_64

Post links to your 64bit module repos here. Repo maintainers are responsible for resolving any issues caused by their xzm's.
User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

GraphicsMagick V1.3.35 x86_64

Post#1 by Rava » 03 Apr 2020, 08:38

GraphicsMagick, like ImageMagick, is a very powerful image converter and able to manipulate images in various ways. It is used via the Command-line interface

GraphicsMagick-1.3.35-lp152.1.1+libGraphicsMagick-Q16-3-1.3.35-lp152.1.1.x86_64.xzm (2.42 MB)
(tested in Porteus 5.0rc1 XFCE, but it should work in all other DEs as well)

The md5sum is like filehorst says:

Code: Select all

9aebe1ae294cf3eca71a041ad70bb6a1  GraphicsMagick-1.3.35-lp152.1.1+libGraphicsMagick-Q16-3-1.3.35-lp152.1.1.x86_64.xzm
To get it, first wait 15 seconds "Dein Download wird jetzt vorbereitet." (Your download is being prepared)
Then click "Jetzt zur Download-Seite" (now to the download page)
Then click "Dein Download steht nun bereit. Klicke hier, um ihn zu starten." (Your download is ready. Click here to start downloading it)

I prefer the fork GraphicsMagick over the original, ImageMagick
GraphicsMagick is a fork of ImageMagick, emphasizing stability of both programming API and command-line options. It was branched off ImageMagick's version 5.5.2 in 2002 after irreconcilable differences emerged in the developers' group.
The fork not only emphasizes stability, but also other reasons:
https://marc.info/?l=imagemagick-develo ... 831767&w=2
At the end of November, 2002, Cristy (principle author of ImageMagick)
decided to make ImageMagick a personal project again, as it had been
from 1991 to 1998. The ImageMagick project is still open source, but
is maintained and developed by Cristy.
As one might imagine, a large project as ImageMagick having only one maintainer is a less that ideal approach.
The objectives of GraphicsMagick are to:

o Use an open development model.
o Encourage new developers to join the project.
o Avoid unnecessary source code "churn".
o Establish and preserve a stable API.
o Use efficient coding practices which result in fast code.
o Improve memory efficiency.

o Use a release process which assures a working product.
o Maintain an accurate ChangeLog.
(emphasis by me)

Unlike ImageMagick, there is only one binary in GraphicsMagick - "gm" - and no symlinks.

You get help for a single command e.g. for mogrify via gm mogrify -help or via the gm man page.

Cave! Some commands might overwrite the input file! Make sure you understand the syntax of the gm commands prior using them on the only original files without having made backups.


The commands known to gm are as follows:

Code: Select all

    animate - animate a sequence of images
      batch - issue multiple commands in interactive or batch mode
  benchmark - benchmark one of the other commands
    compare - compare two images
  composite - composite images together
    conjure - execute a Magick Scripting Language (MSL) XML script
    convert - convert an image or sequence of images
    display - display an image on a workstation running X
       help - obtain usage message for named command
   identify - describe an image or image sequence
     import - capture an application or X server screen
    mogrify - transform an image or sequence of images
    montage - create a composite image (in a grid) from separate images
       time - time one of the other commands
    version - obtain release version
Therefore for your convenience I give some examples how you use it in the CLI. Cave! Some examples use IF and OF as short for Infile and Outfile. These are meant to have the file extension included, e.g. IF being "whatever.png" and not as "whatever".

Code: Select all

Convert all PNGs into JPEGs using a higher that standard quality, but only 67% of the original size: verbose
gm mogrify -verbose -format jpeg -quality 93 -geometry 67% *png
non verbose
gm mogrify -format jpeg -quality 93 -geometry 67% *png

convert, resize, without verbose
gm convert -quality 93 -geometry 204% input.jpg output_204.jpg

mogrify, force new resolution even when aspect ratio gets changed with "!":
gm mogrify -quality 93 -geometry 683x384! intro*.png

crop: width 1013 - height 1092 - X Offset 553 - Y Offset 54
gm mogrify  -quality 100 -crop 1013x1092+533+54 IN.png

Rotate with black background, your first have to define the background colour like so:
gm convert -quality 93 -background black -rotate -45 name.png name_r.jpg

Width maximal 1920, height maximal 1080 px :  (-geometry width x height):
gm convert -quality 93 -geometry 1920x1080 IF OF

Width maximal 1080, height maximal 1920 px :  (-geometry height x width)
gm convert -quality 93 -geometry 1080x1920 IF OF
I hope my few examples help you to start using GM right away.
Cheers!
Yours Rava