The Hubzilla
 All Classes Namespaces Files Functions Variables Pages
photo_imagick Class Reference
Inheritance diagram for photo_imagick:
[legend]

Public Member Functions

 supportedTypes ()
 
 get_FormatsMap ()
 
 load ($data, $type)
 
 destroy ()
 
 setDimensions ()
 
 getImage ()
 
 doScaleImage ($dest_width, $dest_height)
 
 rotate ($degrees)
 
 flip ($horiz=true, $vert=false)
 
 cropImage ($max, $x, $y, $w, $h)
 
 cropImageRect ($maxx, $maxy, $x, $y, $w, $h)
 
 imageString ()
 
- Public Member Functions inherited from photo_driver
 supportedTypes ()
 
 load ($data, $type)
 
 destroy ()
 
 setDimensions ()
 
 getImage ()
 
 doScaleImage ($new_width, $new_height)
 
 rotate ($degrees)
 
 flip ($horiz=true, $vert=false)
 
 cropImage ($max, $x, $y, $w, $h)
 
 cropImageRect ($maxx, $maxy, $x, $y, $w, $h)
 
 imageString ()
 
 __construct ($data, $type='')
 
 __destruct ()
 
 is_valid ()
 
 getWidth ()
 
 getHeight ()
 
 saveImage ($path)
 
 getType ()
 
 getExt ()
 
 scaleImage ($max, $float_height=true)
 scale image int $max maximum pixel size in either dimension boolean $float_height - if true allow height to float to any length on tall images, constraining only the width More...
 
 scaleImageUp ($min)
 
 scaleImageSquare ($dim)
 
 exif ($filename)
 reads exif data from filename More...
 
 orient ($exif)
 orients current image based on exif orientation information More...
 
 save ($arr)
 

Additional Inherited Members

- Protected Attributes inherited from photo_driver
 $image
 
 $width
 
 $height
 
 $valid
 
 $type
 
 $types
 

Member Function Documentation

photo_imagick::cropImage (   $max,
  $x,
  $y,
  $w,
  $h 
)

We need to remove the canvas, or the image is not resized to the crop: http://php.net/manual/en/imagick.cropimage.php#97232

photo_imagick::cropImageRect (   $maxx,
  $maxy,
  $x,
  $y,
  $w,
  $h 
)

We need to remove the canvas, or the image is not resized to the crop: http://php.net/manual/en/imagick.cropimage.php#97232

photo_imagick::destroy ( )
photo_imagick::doScaleImage (   $dest_width,
  $dest_height 
)

If it is not animated, there will be only one iteration here, so don't bother checking

Referenced by cropImage(), and cropImageRect().

photo_imagick::flip (   $horiz = true,
  $vert = false 
)
photo_imagick::get_FormatsMap ( )

Referenced by load().

photo_imagick::getImage ( )
photo_imagick::imageString ( )
photo_imagick::load (   $data,
  $type 
)

Setup the image to the format it will be saved to

setup the compression here, so we'll do it only once

From http://www.imagemagick.org/script/command-line-options.php#quality:

'For the MNG and PNG image formats, the quality value sets the zlib compression level (quality / 10) and filter-type (quality % 10). The default PNG "quality" is 75, which means compression level 7 with adaptive PNG filtering, unless the image has a color map, in which case it means compression level 7 with no PNG filtering'

photo_imagick::rotate (   $degrees)
photo_imagick::setDimensions ( )

Referenced by doScaleImage(), flip(), load(), and rotate().

photo_imagick::supportedTypes ( )

The documentation for this class was generated from the following file: