Image __construct(
$album, sting
$filename, [
$quiet = false], object
&$album
)
|
|
Constructor for class-image
Do not call this constructor directly unless you really know what you are doing! Use instead the function newImage() which will instantiate an object of the correct class for the file type.
Parameters:
object |
&$album: |
the owning album |
sting |
$filename: |
the filename of the image |
|
$album: |
|
|
$quiet: |
|
Redefinition of:
- MediaObject::__construct()
- Class instantiator
Redefined in descendants as:
void checkAccess(
[
&$hint = NULL], [
&$show = NULL]
)
|
|
returns true if user is allowed to see the image
Parameters:
Redefinition of:
- ThemeObject::checkAccess()
- Checks if viewing of object is allowed
void checkforGuest(
[
&$hint = NULL], [
&$show = NULL], unknown_type
$hint, unknown_type
$show
)
|
|
Checks if guest is loggedin for the album
Parameters:
unknown_type |
$hint: |
|
unknown_type |
$show: |
|
|
&$hint: |
|
|
&$show: |
|
bool classSetup(
&$album, string
$filename, object
$album
)
|
|
generic "image" class setup code Returns true if valid image.
Parameters:
object |
$album: |
the images' album |
string |
$filename: |
of the image |
|
&$album: |
|
API Tags:
void copy(
string
$newalbum
)
|
|
Copies the image to a new album, along with all metadata.
Parameters:
string |
$newalbum: |
the destination album |
Redefinition of:
- PersistentObject::copy()
- Copy this record to another unique set. Checks if the record exists there first, if so returns false. If successful returns true. No changes are made to this object and no other objects are created, just the database entry.
Returns true if the file has changed since last time we looked
API Tags:
Returns the album that holds this image
Retuns the folder name of the album that holds this image
string getCity(
[
$locale = NULL]
)
|
|
Returns the city field of the image
Parameters:
Returns the default sized image HTML
Redefined in descendants as:
string getCopyright(
[
$locale = NULL]
)
|
|
Returns the copyright field of the image
Parameters:
string getCountry(
[
$locale = NULL]
)
|
|
Returns the country field of the image
Parameters:
string getCredit(
[
$locale = NULL]
)
|
|
Returns the credit field of the image
Parameters:
string getCustomImage(
int
$size, int
$width, int
$height, int
$cropw, int
$croph, int
$cropx, int
$cropy, [bool
$thumbStandin = false], [bool
$effects = NULL]
)
|
|
Get a custom sized version of this image based on the parameters.
Parameters:
int |
$size: |
size |
int |
$width: |
width |
int |
$height: |
height |
int |
$cropw: |
crop width |
int |
$croph: |
crop height |
int |
$cropx: |
crop x axis |
int |
$cropy: |
crop y axis |
bool |
$thumbStandin: |
set to true to treat as thumbnail |
bool |
$effects: |
set to desired image effect (e.g. 'gray' to force gray scale) |
Redefined in descendants as:
Returns the image filename
string getFullImage(
[string
$path = WEBPATH]
)
|
|
Returns a path to the original image in the original folder.
Parameters:
string |
$path: |
the "path" to the image. Defaults to the simple WEBPATH |
returns URL to the original image
Redefined in descendants as:
-
Video::getFullImageURL()
: returns URL to the original image or to a high quality alternate e.g. ogg, avi, wmv files that can be handled by the client browser
Returns the height of the image
string getImageFootprint(
)
|
|
Returns the disk size of the image
Returns a path urlencoded image page link for the image
API Tags:
Deprecated: | since version 1.4.6 |
Get the index of this image in the album, taking sorting into account.
Returns a path urlencoded image page link for the image
string getLocation(
[
$locale = NULL]
)
|
|
Returns the location field of the image
Parameters:
Returns an array of EXIF data
Return the previous Image
string getSizedImage(
int
$size
)
|
|
Returns a path to a sized version of the image
Parameters:
int |
$size: |
how big an image is wanted |
Redefined in descendants as:
string getState(
[
$locale = NULL]
)
|
|
Returns the state field of the image
Parameters:
string getThumb(
[
$type = 'image']
)
|
|
Get a default-sized thumbnail of this image.
Parameters:
Redefined in descendants as:
void getThumbCropping(
$ts,
$sw,
$sh, string
$type
)
|
|
Returns an array of cropping parameters. Used as a "helper" function for various inherited getThumb() methods
Parameters:
string |
$type: |
the type of thumb (in case it ever matters in the cropping, now it does not.) |
|
$ts: |
|
|
$sw: |
|
|
$sh: |
|
s getThumbImageFile(
string
$path
)
|
|
Returns the image file name for the thumbnail image.
Parameters:
string |
$path: |
override path |
Redefined in descendants as:
Returns the custom watermark name
Returns the width of the image
Returns the custom watermark usage
returns true if there is any protection on the image
int move(
Album
$newalbum, [string
$newfilename = null]
)
|
|
Moves an image to a new album and/or filename (rename).
Returns 0 on success and error indicator on failure.
Parameters:
Album |
$newalbum: |
the album to move this file to. Must be a valid Album object. |
string |
$newfilename: |
the new file name of the image in the specified album. |
Redefinition of:
- PersistentObject::move()
- Change one or more values of the unique set assigned to this record.
bool remove(
bool
$clean
)
|
|
Permanently delete this image (permanent: be careful!)
Returns the result of the unlink operation (whether the delete was successful)
Parameters:
bool |
$clean: |
whether to remove the database entry. |
Redefinition of:
- PersistentObject::remove()
- Deletes object from the database
bool rename(
string
$newfilename
)
|
|
Renames an image to a new filename, keeping it in the same album. Convenience for move($image->album, $newfilename).
Returns true on success and false on failure.
Parameters:
string |
$newfilename: |
the new file name of the image file. |
void setCity(
string
$city
)
|
|
Stores the city field of the image
Parameters:
string |
$city: |
text for the city |
void setCopyright(
string
$copyright
)
|
|
Stores the text for the copyright field of the image
Parameters:
string |
$copyright: |
text for the copyright field |
void setCountry(
string
$country
)
|
|
Stores the country field of the image
Parameters:
string |
$country: |
text for the country filed |
void setCredit(
string
$credit
)
|
|
Stores the credit field of the image
Parameters:
string |
$credit: |
text for the credit field |
void setLocation(
string
$location
)
|
|
Stores the location field of the image
Parameters:
string |
$location: |
text for the location |
void setState(
string
$state
)
|
|
Stores the state field of the image
Parameters:
string |
$state: |
text for the state |
void setWatermark(
string
$wm
)
|
|
Set custom watermark
Parameters:
void setWMUse(
$use
$use
)
|
|
Sets the custom watermark usage
Parameters:
Update this object's values for width and height.
Redefined in descendants as:
Parses Exif/IPTC data
Redefined in descendants as: