Search by

bitandblack / image-information

TobiasKöngeterBit&Black

Reading information of images

Package info

bitbucket.org/wirbelwild/imageinformation

Homepage

Issues

pkg:composer/bitandblack/image-information

Fund package maintenance!

Buymeacoffee

Statistics

Installs: 4 518

Dependents: 3

Suggesters: 0

3.3.0 2026-11-11 08:19 UTC

This package is auto-updated.

Last update: 2026-11-11 08:20:10 UTC


README

PHP from Packagist Latest Stable Version Total Downloads License

Bit&Black Logo

Bit&Black Image Information

Read information of images:

  • The size
  • The color profile

Currently supported files and extensions:

  • ai Adobe Illustrator Artwork
  • ani Animated Cursor
  • avif AV1 Image File Format
  • bmp Windows Bitmap
  • cur Cursor
  • dds DirectDraw Surface
  • eps Encapsulated PostScript
  • exr OpenEXR
  • gif Graphics Interchange Format
  • hdr Radiance HDR
  • heic, heif High Efficiency Image Container
  • ico Initial Coin Offering
  • iff Interchange File Format
  • jng JPEG Network Graphics
  • jp2, jpf (Extended) JPEG 2000
  • jpg, jpeg Joint Photographic Experts Group
  • jxl JPEG XL
  • jxr JPEG XR
  • mng Multiple-image Network Graphics
  • pcx PCX
  • pdf Portable Document Format
  • png Portable Network Graphics
  • psd (Adobe) Photoshop Document
  • qoi Quite OK Image Format
  • svg, svgz Scalable Vector Graphics
  • tga Truevision TGA
  • tif, tiff Tagged Image File Format
  • wbmp Wireless Application Protocol Bitmap Format
  • webp Google WebP

Installation

This package is made for the use with Composer. Add it to your project by running $ composer require bitandblack/image-information.

Usage

Define your file with the File class. Init the Image class then and add your file:

<?php

use BitAndBlack\ImageInformation\Image;
use BitAndBlack\ImageInformation\Source\File;

$file = new File('MyFile.eps');
$image = new Image($file);

Access the image size: $image->getSize();

Access the images color profile: $image->getIccProfile();

Cache

You can speed up the library by using a cache. When initializing the image class, add a cache object as second parameter:

<?php

use BitAndBlack\ImageInformation\Cache\Cache;
use BitAndBlack\ImageInformation\Image;
use BitAndBlack\ImageInformation\Source\File;

$file = new File('MyFile.eps');
$image = new Image($file, new Cache());

Per default, the cache class uses a file system cache. This can be configured as only a PSR cache compatible class is needed.

Help

If you have questions feel free to contact us under hello@bitandblack.com.

Further information about Bit&Black can be found under www.bitandblack.com.