Rubblewebs

THESE CODES ARE PROVIDED FOR AN EXAMPLE OF HOW TO USE IMAGEMAGICK WITH PHP. CARE SHOULD BE TAKEN WHEN ACCEPTING USER INPUT.

I TAKE NO RESPONSABILTY FOR ANY PROBLEMS THAT MAY OCCURE WHEN USING ANY OF THIS CODE.

IT IS UP TO YOU TO SECURE THE CODE AND VALIDATE USER INPUT.

Image information

Minimal information

		
echo "<pre>";
system("identify ../code/sunflower.jpg");
echo "</pre>";

	

Output:

../code/sunflower.jpg JPEG 400x300 400x300+0+0 DirectClass 8-bit 37.5371kb

All available information

		
echo "<pre>";
system("identify -verbose ../code/sunflower.jpg");
echo "</pre>";

	

Output:

Image: ../code/sunflower.jpg
  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Class: DirectClass
  Geometry: 400x300+0+0
  Type: TrueColor
  Endianess: Undefined
  Colorspace: RGB
  Channel depth:
    Red: 8-bit
    Green: 8-bit
    Blue: 8-bit
  Channel statistics:
    Red:
      Min: 9 (0.0352941)
      Max: 255 (1)
      Mean: 167.555 (0.657078)
      Standard deviation: 61.2115 (0.240045)
    Green:
      Min: 0 (0)
      Max: 255 (1)
      Mean: 127.962 (0.501814)
      Standard deviation: 63.0206 (0.247139)
    Blue:
      Min: 0 (0)
      Max: 255 (1)
      Mean: 30.7509 (0.120592)
      Standard deviation: 66.3264 (0.260104)
  Colors: 44713
  Rendering intent: Undefined
  Resolution: 72x72
  Units: PixelsPerInch
  Filesize: 37.5371kb
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Page geometry: 400x300+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: JPEG
  Quality: 85
  Orientation: TopLeft
  Exif:DateTime: 2006:07:29 16:10:30
  Exif:Make: FUJIFILM
  Exif:Model: FinePix E550   
  Exif:Orientation: 1
  Exif:ResolutionUnit: 2
  Exif:Software: Digital Camera FinePix E550    Ver1.00
  Exif:XResolution: 72/1
  Exif:YCbCrPositioning: 2
  Exif:YResolution: 72/1
  Jpeg:colorspace: 2
  Jpeg:sampling-factor: 2x2,1x1,1x1
  Signature: 55c4ad08f3ff13d0df50b0e5200e98216a291c6a2c666cb4717c19fc9dcf289e
  Unknown: 251
  Profile-exif: 8064 bytes
  Tainted: False
  Version: ImageMagick 6.3.4 05/11/07 Q16 http://www.imagemagick.org