# identify — Bild-Metadaten und Format ermitteln

> Praxis-Guide zu identify aus ImageMagick: Format, Maße, Farbtiefe und EXIF-Metadaten von Bildern auslesen – ideal für Skripte und Batch-Inspektion.

Source: https://www.jpkc.com/db/cheatsheets/images-media/identify/

<!-- PROSE:intro -->
identify aus dem ImageMagick-Werkzeugkasten liest Bilddateien aus, ohne sie zu verändern: Format, Maße, Farbtiefe, Farbraum, Kompression und sämtliche EXIF-Metadaten landen in einem einzigen Aufruf. Über `-format` schneidest du die Ausgabe exakt auf das zu, was du brauchst – perfekt für Skripte, CSV-Reports oder die schnelle Batch-Inspektion ganzer Verzeichnisse. Unter ImageMagick 7 rufst du das Tool bevorzugt als `magick identify` auf; das klassische `identify` bleibt aber kompatibel.
<!-- PROSE:intro:end -->

## Grundlegende Nutzung

`identify <image>` — Zeigt grundlegende Bildinfos (Format, Maße, Farbtiefe, Größe).

```bash
identify photo.jpg
```

`identify -verbose <image>` — Zeigt alle verfügbaren Bildeigenschaften und Metadaten.

```bash
identify -verbose photo.jpg
```

`identify <image1> <image2> ...` — Untersucht mehrere Bilder auf einmal.

```bash
identify *.png
```

`identify -ping <image>` — Liest nur Basisinfos, ohne das Bild komplett zu laden (schneller).

```bash
identify -ping largefile.tiff
```

## Formatierte Ausgabe

`identify -format "%w x %h" <image>` — Gibt nur Breite und Höhe aus.

```bash
identify -format "%w x %h" photo.jpg
```

`identify -format "%m" <image>` — Gibt nur das Bildformat aus (JPEG, PNG usw.).

```bash
identify -format "%m" photo.jpg
```

`identify -format "%b" <image>` — Gibt die Dateigröße aus.

```bash
identify -format "%b" photo.jpg
```

`identify -format "%z" <image>` — Gibt die Farbtiefe aus (z. B. 8, 16).

```bash
identify -format "%z" photo.jpg
```

`identify -format "%r" <image>` — Gibt Bildklasse und Farbraum aus (z. B. DirectClass sRGB).

```bash
identify -format "%r" photo.jpg
```

`identify -format "%C" <image>` — Gibt den Kompressionstyp aus.

```bash
identify -format "%C" photo.jpg
```

`identify -format "%n" <image>` — Gibt die Anzahl der Frames/Ebenen aus (nützlich bei GIFs oder mehrseitigen TIFFs).

```bash
identify -format "%n" animation.gif
```

`identify -format "%Q" <image>` — Gibt die JPEG-Kompressionsqualität aus.

```bash
identify -format "%Q" photo.jpg
```

## Metadaten & Eigenschaften

`identify -format "%[EXIF:*]" <image>` — Gibt alle EXIF-Metadaten aus.

```bash
identify -format "%[EXIF:*]" photo.jpg
```

`identify -format "%[EXIF:DateTimeOriginal]" <image>` — Gibt das Aufnahmedatum aus den EXIF-Daten aus.

```bash
identify -format "%[EXIF:DateTimeOriginal]" photo.jpg
```

`identify -format "%[EXIF:Make] %[EXIF:Model]" <image>` — Gibt Kamerahersteller und -modell aus.

```bash
identify -format "%[EXIF:Make] %[EXIF:Model]" photo.jpg
```

`identify -format "%[colorspace]" <image>` — Gibt die Farbraum-Eigenschaft aus.

```bash
identify -format "%[colorspace]" photo.jpg
```

`identify -format "%[channels]" <image>` — Gibt Anzahl und Art der Kanäle aus.

```bash
identify -format "%[channels]" photo.png
```

`identify -format "%[type]" <image>` — Gibt den Bildtyp aus (TrueColor, Grayscale, Palette usw.).

```bash
identify -format "%[type]" photo.png
```

## Batch & Skripte

`identify -format "%f: %wx%h\n" *.jpg` — Listet alle JPEGs mit Dateiname und Maßen auf.

```bash
identify -format "%f: %wx%h\n" *.jpg
```

`identify -format "%f,%w,%h,%b,%m\n" *.png` — Erzeugt CSV-Ausgabe für alle PNGs.

```bash
identify -format "%f,%w,%h,%b,%m\n" images/*.png
```

`identify -format "%[fx:w*h]" <image>` — Berechnet die Gesamtzahl der Pixel per fx-Ausdruck.

```bash
identify -format "%[fx:w*h]" photo.jpg
```

`identify -format "%[fx:w/h]" <image>` — Berechnet das Seitenverhältnis.

```bash
identify -format "%[fx:w/h]" photo.jpg
```

## Häufige Format-Platzhalter

`%w, %h` — Breite und Höhe in Pixeln.

```bash
identify -format "%w x %h" photo.jpg
```

`%m, %f, %e` — Format (Magick), Dateiname, Erweiterung.

```bash
identify -format "%f (%m)" photo.jpg
```

`%b, %z, %r` — Dateigröße, Farbtiefe, Bildklasse/Farbraum.

```bash
identify -format "Size: %b, Depth: %z, Color: %r" photo.jpg
```

`%k, %Q, %C` — Eindeutige Farben, Qualität, Kompressionstyp.

```bash
identify -format "Colors: %k, Quality: %Q" photo.jpg
```

`%x, %y` — Horizontale und vertikale Auflösung (DPI).

```bash
identify -format "%x x %y DPI" photo.jpg
```

<!-- PROSE:outro -->
## Fazit

identify ist ein reines Lese-Werkzeug und damit ungefährlich: Es verändert keine Datei, sondern liefert dir nur Auskunft über sie. Für den Alltag reichen meist `identify <bild>` und ein passender `-format`-String; mit `-ping` beschleunigst du die Inspektion großer Dateien, weil nur der Header gelesen wird. Beachte, dass `%[EXIF:*]` personenbezogene Daten wie GPS-Koordinaten, Kameraseriennummern oder Zeitstempel offenlegen kann – vor dem Veröffentlichen von Bildern lohnt sich der Blick darauf. Unter ImageMagick 7 ist `magick identify` der empfohlene Aufruf.

## Weiterführende Links

- [ImageMagick: identify](https://imagemagick.org/script/identify.php) – offizielle Referenz zum Kommando und seinen Optionen
- [ImageMagick: Format and Print Image Properties](https://imagemagick.org/script/escape.php) – vollständige Liste aller `-format`-Platzhalter
<!-- PROSE:outro:end -->

## Verwandte Kommandos

- [convert](https://www.jpkc.com/db/cheatsheets/images-media/convert/) – Bilder konvertieren, skalieren und transformieren
- [compare](https://www.jpkc.com/db/cheatsheets/images-media/compare/) – zwei Bilder pixelgenau vergleichen
- [mogrify](https://www.jpkc.com/db/cheatsheets/images-media/mogrify/) – Bilder stapelweise direkt bearbeiten

