Questions tagged [graphicsmagick]

19 questions
13
votes
1 answer

How to auto-trim scanned images using imagemagick or graphicsmagick?

I've got some scanned images in *.jpg format. They are scanned using A4 scanner, in greyscale or colour. Scanned pages have very different dimensions - some A5, some A6, some business cards etc. Scanner cover is white. I want to trim all the white…
Arek
  • 241
10
votes
3 answers

How do I change the canvas size of a PNG with ImageMagick (GraphicsMagick)? (How to pad with transparency?)

Alternatively: How do I take a non-square PNG and "fill out" the "rest" of the image with transparency so that the resulting square image has the original image centered in the square? ULTIMATELY, what I want is to take any image of any GM-supported…
Pistos
  • 397
7
votes
2 answers

How to display a picture and print pixel coordinates when I click?

When using ImageMagick or similar command line tools it can be useful to know coordinates of some points in the image. How to display an image (with panning and zooming) and print coordinates of pixels when I click at them? Nearest thing I found is…
3
votes
1 answer

transparent gradients with graphicsmagick

I'm trying to create a gradient that goes from transparent to some color. With imageMagick you can do that with (taken from the documentation): convert -size 100x100 gradient:none-firebrick gradient_transparent.png If I try the same command in…
2
votes
2 answers

How to find duplicate images, possibly with different resolutions?

I have some images (photos) and there are duplicates but no matter how I sort them they are scattered because of resolution and irregular naming. I tried gm compare but can't figure out which metric to use or which values would indicate a…
yarns
  • 145
1
vote
1 answer

How do I extract video frames for editing one at a time?

I'm trying to apply graphicsmagick v1.3.42 filters/resizing to frames from videos extracted with ffmpeg v6.1. The process of extracting and resizing all frames uses alot of space, I want to iterate and edit each frame individually if thats…
yarns
  • 145
1
vote
1 answer

How can I with Linux easily create a collage of passport photos?

I can easily crop a photo to the right dimensions or use an online tool, but I need to make it into a 4x6 because CVS charges $0.25 for a 4'' x 6'' but they charge $12.99 with a coupon for a 2'' x 2''.
Evan Carroll
  • 9,518
1
vote
1 answer

inlay or composite image into corner of larger image, GraphicsMagic or ImageMagick

(A) I have a rotation of a part so I have 360 tiff files, which I can animate in ImageMagick and also export to an animated gif. This image is 1920x1080, with a black background, there are 360 of them: image_A_001.tiff to image_A_360.tiff. (B) I…
ron
  • 778
0
votes
1 answer

How do I make weighed average (using alhpa channel as weight) of pictures?

I have multiple similar pictures I want to make aveage of, but not uniformatically. Each zone in pictures should have separate weight, and the weight is encoded in alhpa channel (fully transparent - zero weight, fully opaque - unit weight). How to…
Vi.
  • 17,755
0
votes
1 answer

Is there a GraphicsMagick equivalent to ImageMagick's image stack?

Although GraphicsMagick is a fork of ImageMagick, there are dissimilarities between the two, namely in the support of image stacking in ImageMagick, but not in GraphicsMagick. Taken from the ImageMagick documentation: convert wand.gif \( wizard.gif…
0
votes
1 answer

How to create a transparent image with GraphicsMagick CLI?

I'm coming up empty handed while trying to find out how to modify the opacity of an image using the GraphicsMagick CLI. I'm simply trying to input a standard image and convert it to the corresponding image with a reduced opacity. I'm running…
0
votes
1 answer

Why does gm always export all layers of the input image?

Given the following command line: '/usr/bin/gm' convert 'directory/filename.psd[0]' filename.jpg I will always receive all layers from the .psd as output: $ ls something* something.jpg.0 something.jpg.1 something.jpg.2 The documentation clearly…
Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311
0
votes
0 answers

How to get gm -draw text to work on Debian?

Here we are in Debian and $ gm convert -draw 'text 100,100 abc' in.jpg out.jpg gm convert: Unable to read font (/usr/share/fonts/type1/gsfonts/n019003l.pfb) [No such file or directory]. We do aptitude show graphicsmagick and find not a shred of…
Dan Jacobson
  • 217
  • 2
  • 7
0
votes
0 answers

Connected components labeling in GraphicsMagick?

Is there a way to scan the image pixel by pixel and print the coordinates of each pixel regions by color? similiar to this ImageMagick´s feature Uniquely Label Connected Regions. I'd like to do it in bash or python to identify the coordinates of…
0
votes
0 answers

animated gif speed, nice in ImageMagick or GraphicsMagic, slow in powerpoint

I have N tiff files. In linux I can do convert -delay 0 -loop 0 *.tiff output.gif In linux, using gm animate *.tif I get a nice smooth rotation at a nice speed. And if I recreate N tiff files to have 2N files the rotation slows but is still good,…
ron
  • 778
1
2