Questions tagged [imagemagick-identify]

For the ImageMagick bitmap conversion software suite, the identify program describes the format and characteristics of one or more image files. It also reports if an image is incomplete or corrupt.

Source: http://www.imagemagick.org/script/identify.php

The identify program describes the format and characteristics of one or more image files. It also reports if an image is incomplete or corrupt. The information returned includes the image number, the file name, the width and height of the image, whether the image is colormapped or not, the number of colors in the image, the number of bytes in the image, the format of the image (JPEG, PNM, etc.), and finally the number of seconds it took to read and process the image. Many more attributes are available with the verbose option. See Command Line Processing for advice on how to structure your identify command or see below for example usages of the command.

35 questions
12
votes
5 answers

Fast and efficient way to detect if two images are visually identical in Python

Given two images: image1.jpg image2.jpg What's a fast way to detect if they are visually identical in Python? For example, they may have different EXIF data which would yield different checksums, even though the image data is the same). Imagemagick…
ensnare
  • 40,069
  • 64
  • 158
  • 224
4
votes
3 answers

How to prevent image bombs with ImageMagick?

I currently use Imagick library on PHP and use the resizing functionality of Image Magick. I've just learned about decompression bombs and how ImageMagick is vulnerable to it. I have checked how we can ping the image and verify the dimensions of the…
gerky
  • 6,267
  • 11
  • 55
  • 82
4
votes
1 answer

ImageMagick: get image size with respect to EXIF orientation

I know that convert can use -auto-orient parameter to correctly rotate image when resizing it but can I somehow get image's rotated size with respect to EXIF orientation using identify?
martin
  • 93,354
  • 25
  • 191
  • 226
2
votes
1 answer

how to parse stdout of imagick identify?

when i run wget -q -O- 'https://cdn.sstatic.net/Sites/stackoverflow/company/img/logos/so/so-icon.png' | magick identify -verbose - i get Image: /tmp/magick-25620GqQdCVSm3pGs Base filename: - Format: PNG (Portable Network Graphics) Mime type:…
hanshenrik
  • 19,904
  • 4
  • 43
  • 89
2
votes
1 answer

ImageMagick. Putting Redaction on a document without changing quality and size of document

I am new to ImageMagick.I need to create redaction over a document(.doc ) and image formats in order to cover some texts with help of ImageMagick . Then, I have to convert it to .tif format.I don't want to change size of document as I want to…
2
votes
2 answers

ImageMagick Convert BMP from 24 bit to 16 bit Mode?

I am trying to convert a BMP from 24 bits/pixel to 16 bit/pixel Mode in ImageMagick. convert /tmp/a/new/37.bmp -depth 5 -define bmp:format=bmp2 /tmp/a/new/37_v2_16bit.bmp convert /tmp/a/new/37.bmp -depth 5 -define bmp:format=bmp3…
2
votes
1 answer

Extract part of an image to identify

I try to get verbose information about a part of an image. I read the doc of imageMagick and as far as I understand it, it should be possible to call identify with the -extract option. But, when I call it, I got an error message: 'unrecognized…
Simon
  • 197
  • 1
  • 2
  • 7
2
votes
1 answer

ImageMagick identify reports incorrect GIF frame count

I'm using ImageMagick to do some stuff with GIF images. One of my steps is identifying the number of frames in an image. I'm calling identify via node-imagemagick (and later gm) like this: identify -format '%T,%w,%h ' test.gif Most of the time I…
Dan Abramov
  • 264,556
  • 84
  • 409
  • 511
1
vote
0 answers

Determine How Many Unique Colors in an Image

I'm trying to identify the total number of colors in an image. I am attempting this using identify and I am using version 6.9.10-68. The manual says to use this format: identify [options] input-file and it also says that identifying the number of…
GFL
  • 1,278
  • 2
  • 15
  • 24
1
vote
1 answer

Trim image with transparency around and know it's location

I know it is possible to trim all transparency around image to make image smaller and contain only the image. But is it also possible to somehow know the location of "box", that contains the image? For example I have 100x100 transparent image, which…
K.H.
  • 1,383
  • 13
  • 33
1
vote
2 answers

Looping through images in python using subprocess Popen and PIPE

I have a folder that has a bunch of images. I'm trying to write a python script that will loop through each image and return the width/height and then append it to my dictionary. A simplified version of my dictionary looks like this: in_metadata =…
wmaddox
  • 141
  • 2
  • 10
1
vote
1 answer

ImageMagick identifies a different colorspace between Mac and Linux

I have a JPEG image. On my Mac, when I type: identify -verbose img.jpg I get Colorspace: sRGB. On my Linux box, when I type the same thing I get Colorspace: RGB. Why? Has anyone encountered this before? The reason this matters: I get wildly…
0
votes
1 answer

ImageMagick -format argument No decode delegate

I am getting errors when trying to use the format argument in any command, I tried to espace the using backslashes like this \"%m:%f %wx%h\" but it doesn't work either I am running on a MAC M1, not sure if it could impact Example identify -units…
Teta
  • 129
  • 9
0
votes
1 answer

ImageMagick - Add white border to many photos with a size relative to the width and height (ex: width * 1.34%)

Is it possible to write a script that can create a copy of all the pictures in a file and add a white border to it with the border multiplied by a certain percentage? I want the width of the new image (old image + border) to be about 134% of the old…
0
votes
3 answers

Imagemagick only reading red channel

I have a TIFF-Image, which i want to convert into a JPG. While on my local machine (Ubuntu 19.10LTS), I have ImageMagick 6.9 installed, the targeted system (Alpine 3.12.4) will have 7.0 installed. I use this command to convert the image: convert…
1
2 3