apidoc
[ class tree: apidoc ] [ index: apidoc ] [ all elements ]

Class: Image_Remote

Source Location: /Image_Remote-1.0.2/Remote.php

Class Overview


Image_Remote - retrieve size from remote image files.


Author(s):

Version:

  • $Revision: 1.3 $

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 95]
Image_Remote - retrieve size from remote image files.

Class can be used to get size information from remote image files without downloading the whole image file. It mimics the GetImageSize() PHP function but works on remote images. Gif, jpeg and png currently supported.

NOTE: Since PHP 4.0.5 URL support was added also to PHP's native GetImageSize().

Usage:

$i = new Image_Remote("http://www.example.com/test.jpg"); if (PEAR::isError($i)) { print "ERROR: " . $i->getMessage(); } else { $size = $i->getImageSize(); $comment = $i->getImageComment(); }



[ Top ]


Class Variables

$comment =

[line 160]

JPEG comment

Type:   string


[ Top ]

$errstr =

[line 167]

Error of the last method call

Type:   string


[ Top ]

$extra =

[line 153]

Some useless extrainfo

Type:   string


[ Top ]

$filesize =

[line 118]

Filesize of the remote image

Type:   integer


[ Top ]

$height =

[line 146]

Height of the remote image

Type:   integer


[ Top ]

$imagetype =

[line 132]

Imagetype of the remote image

Type:   integer


[ Top ]

$mimetype =

[line 125]

Mimetype of the remote image

Type:   string


[ Top ]

$purl =

[line 110]

Parsed URL

Type:   array


[ Top ]

$url =

[line 103]

The URL to fetch size from

Type:   string


[ Top ]

$width =

[line 139]

Width of the remote image

Type:   integer


[ Top ]



Method Detail

Image_Remote (Constructor)   [line 177]

object Image_Remote( string $input)

Constructor

Parameters:

string   $input   —  foo URL of the remote image. Currently supports only http.

[ Top ]

getImageComment   [line 252]

string getImageComment( )

Return the Comment found in the remote image.

This comment is being used to specify the JPG image. http://www.w3.org/Graphics/JPEG/itu-t81.pdf


[ Top ]

getImageSize   [line 213]

array getImageSize( )

Return information on the remote image.

Imitates PHP's native GetImageSize.

http://www.php.net/manual/function.getimagesize.php

  • Access: public

[ Top ]

getImageURL   [line 236]

string getImageURL( )

Return the URL of the remote image.

This is actually the same URL which was given to the constructor. However it sometimes comes handy to be able to retrieve the URL again from the object.

  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:29:19 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.