From b69fca14e76a2f5db0cd0924fe5e7056e94771b1 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 26 Feb 2013 15:49:37 -0800 Subject: initial doco --- doc/html/classPhoto.html | 836 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 836 insertions(+) create mode 100644 doc/html/classPhoto.html (limited to 'doc/html/classPhoto.html') diff --git a/doc/html/classPhoto.html b/doc/html/classPhoto.html new file mode 100644 index 000000000..7f7ab186a --- /dev/null +++ b/doc/html/classPhoto.html @@ -0,0 +1,836 @@ + + + + + + +The Red Project: Photo Class Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
The Red Project +
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 __construct ($data, $type=null)
 
 __destruct ()
 
 is_imagick ()
 
 get_FormatsMap ()
 
 is_valid ()
 
 getWidth ()
 
 getHeight ()
 
 getImage ()
 
 getType ()
 
 getExt ()
 
 scaleImage ($max)
 
 rotate ($degrees)
 
 flip ($horiz=true, $vert=false)
 
 orient ($filename)
 
 scaleImageUp ($min)
 
 scaleImageSquare ($dim)
 
 cropImage ($max, $x, $y, $w, $h)
 
 saveImage ($path)
 
 imageString ()
 
 store ($aid, $uid, $xchan, $rid, $filename, $album, $scale, $profile=0, $allow_cid= '', $allow_gid= '', $deny_cid= '', $deny_gid= '')
 
+ + + +

+Static Public Member Functions

static supportedTypes ()
 
+ + + + + + + + + + + + + + + +

+Private Attributes

 $image
 
 $imagick
 
 $width
 
 $height
 
 $valid
 
 $type
 
 $types
 
+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
Photo::__construct ( $data,
 $type = null 
)
+
+

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::__destruct ()
+
+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Photo::cropImage ( $max,
 $x,
 $y,
 $w,
 $h 
)
+
+

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

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
Photo::flip ( $horiz = true,
 $vert = false 
)
+
+ +

Referenced by orient().

+ +
+
+ +
+
+ + + + + + + +
Photo::get_FormatsMap ()
+
+

Maps Mime types to Imagick formats

+ +

Referenced by __construct().

+ +
+
+ +
+
+ + + + + + + +
Photo::getExt ()
+
+ +
+
+ +
+
+ + + + + + + +
Photo::getHeight ()
+
+ +

Referenced by store().

+ +
+
+ +
+
+ + + + + + + +
Photo::getImage ()
+
+ +
+
+ +
+
+ + + + + + + +
Photo::getType ()
+
+ +

Referenced by __construct(), getExt(), imageString(), orient(), and store().

+ +
+
+ +
+
+ + + + + + + +
Photo::getWidth ()
+
+ +

Referenced by store().

+ +
+
+ +
+
+ + + + + + + +
Photo::imageString ()
+
+ +

Referenced by saveImage(), and store().

+ +
+
+ + + + + +
+
+ + + + + + + + +
Photo::orient ( $filename)
+
+ +
+
+ +
+
+ + + + + + + + +
Photo::rotate ( $degrees)
+
+ +

Referenced by orient().

+ +
+
+ +
+
+ + + + + + + + +
Photo::saveImage ( $path)
+
+ +
+
+ +
+
+ + + + + + + + +
Photo::scaleImage ( $max)
+
+

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

+ +

Referenced by cropImage(), and scaleImageUp().

+ +
+
+ +
+
+ + + + + + + + +
Photo::scaleImageSquare ( $dim)
+
+ +
+
+ +
+
+ + + + + + + + +
Photo::scaleImageUp ( $min)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Photo::store ( $aid,
 $uid,
 $xchan,
 $rid,
 $filename,
 $album,
 $scale,
 $profile = 0,
 $allow_cid = '',
 $allow_gid = '',
 $deny_cid = '',
 $deny_gid = '' 
)
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + +
static Photo::supportedTypes ()
+
+static
+
+

supported mimetypes and corresponding file extensions

+

Imagick::queryFormats won't help us a lot there... At least, not yet, other parts of friendica uses this array

+ +

Referenced by __construct(), fbrowser_content(), guess_image_type(), photos_content(), and photos_post().

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
Photo::$height
+
+private
+
+ +

Referenced by getHeight(), scaleImage(), and scaleImageUp().

+ +
+
+ +
+
+ + + + + +
+ + + + +
Photo::$image
+
+private
+
+ +

Referenced by getImage().

+ +
+
+ +
+
+ + + + + +
+ + + + +
Photo::$imagick
+
+private
+
+

Put back gd stuff, not everybody have Imagick

+ +

Referenced by is_imagick().

+ +
+
+ +
+
+ + + + + +
+ + + + +
Photo::$type
+
+private
+
+ +

Referenced by __construct(), and getType().

+ +
+
+ +
+
+ + + + + +
+ + + + +
Photo::$types
+
+private
+
+ +
+
+ +
+
+ + + + + +
+ + + + +
Photo::$valid
+
+private
+
+ +

Referenced by is_valid().

+ +
+
+ +
+
+ + + + + +
+ + + + +
Photo::$width
+
+private
+
+ +

Referenced by getWidth(), scaleImage(), and scaleImageUp().

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + -- cgit v1.2.3