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

Class: Image_Tools_Watermark

Source Location: /Image_Tools-1.0.0RC1/Image/Tools/Watermark.php

Class Overview

Image_Tools
   |
   --Image_Tools_Watermark

This class provide a tool to add a little logo on an image


Author(s):

Version:

  • Release: 1.0.0RC1

Copyright:

  • Copyright (c) 2008 Charles Brunet <charles.fmj@gmail.com>

Variables

Methods


Inherited Variables

Inherited Methods

Class: Image_Tools

Image_Tools::Image_Tools()
Constructor
Image_Tools::availableMethods()
Get available methods
Image_Tools::availableOptions()
Get all available options of the subclass
Image_Tools::createImage()
Create a GD image resource from given input.
Image_Tools::createImageFromFile()
Create a GD image resource from file (JPEG, PNG, WBMP and XBM support).
Image_Tools::createImageFromString()
Create a GD image resource from a string data.
Image_Tools::display()
Display rendered image (send it to browser).
Image_Tools::factory()
Create a new instance of an image tool
Image_Tools::get()
Get the value of the option
Image_Tools::getAPIVersion()
Get the API version of the common base
Image_Tools::getResultImage()
Get rendered image.
Image_Tools::getVersion()
Get the subclass version.
Image_Tools::isGDImageResource()
Find the whether a value is the GD image resource or not.
Image_Tools::isValidOption()
Has the option a valid value? Determines, if the value given is valid for the option.
Image_Tools::postRender()
Function which called after render.
Image_Tools::preRender()
Function which called before render.
Image_Tools::render()
Render the result of a tool to the given image
Image_Tools::save()
Save rendered image to a file.
Image_Tools::set()
Set the option(s)
Image_Tools::supportsMethod()
Get the method parameters
Image_Tools::supportsOption()
Find out the whether a subclass supports the option

Class Details

[line 59]
This class provide a tool to add a little logo on an image
  • Author: Charles Brunet <charles.fmj@gmail.com>
  • Version: Release: 1.0.0RC1
  • Copyright: Copyright (c) 2008 Charles Brunet <charles.fmj@gmail.com>
  • Since: Class available since Release 1.0.0RC1
  • License: BSD License


[ Top ]


Class Variables

$availableOptions = array(
        'image'   => 'mixed',
        'mark'    => 'mixed',
        'width'   => 'int',
        'height'  => 'int',
        'marginx' => 'int',
        'marginy' => 'int',
        'horipos' => 'number',
        'vertpos' => 'number',
        'blend'   => 'string'
    )

[line 100]

Available options for Image_Tools_Watermark
  • Access: protected

Type:   array
Overrides:   Array


[ Top ]

$options = array(
        'image'   => null,
        'mark'    => null,
        'width'   => 0,
        'height'  => 0,
        'marginx' => 0,
        'marginy' => 0,
        'horipos' => IMAGE_TOOLS_WATERMARK_POSITION_RIGHT,
        'vertpos' => IMAGE_TOOLS_WATERMARK_POSITION_BOTTOM,
        'blend'   => 'none'
    )

[line 82]

Thumbnail options:

 image    mixed  Destination image, a filename or an image string data or a GD image resource
 logo     mixed  Source logo, a filename or an image string data or a GD image resource
 width    int    Width of logo; 0 to keep original width
 height   int    Height of logo; 0 to keep original height
 marginx  int    Horizontal margin from the border of the image
 marginy  int    Vertical margin from the border of the image
 horipos  number Horizontal position of the logo on destination image
 vertpos  number Vertical position of the logo on destination image
 blend    string Blending mode to use on composite operation, see
                 Image_Tools_Blend of the supported blend mode. Default
                 is none (no blending).

  • Access: protected

Type:   array
Overrides:   Array


[ Top ]

$version =  '0.2'

[line 118]

Image_Tools_Watermark API version.
  • Access: protected

Type:   string
Overrides:   Array


[ Top ]



Method Detail

preRender   [line 146]

bool|PEAR_Error preRender( )

Function which called before render.

Overrides Image_Tools::preRender() (Function which called before render.)
[ Top ]

render   [line 177]

bool|PEAR_Error render( )

Draw image with logo result to resource.
  • Return: TRUE on success or PEAR_Error on failure.
  • Access: public

Overrides Image_Tools::render() (Render the result of a tool to the given image)
[ Top ]


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