Jaguar - PHP Graphic Library
  • Namespace
  • Class
  • Tree

Namespaces

  • Jaguar
    • Action
      • Blur
      • Color
      • Pixelate
      • Preset
    • Color
    • Drawable
      • Border
      • Style
      • Text
    • Exception
    • Factory
    • Format
    • Gradient

Classes

  • Gd
  • Gif
  • Jpeg
  • Png

Class Png

Jaguar\AbstractCanvas implements Jaguar\CanvasInterface
Extended by Jaguar\CompressableCanvas
Extended by Jaguar\Format\Png
Namespace: Jaguar\Format
Located at Jaguar/Format/Png.php

Methods summary

public
# __construct( Jaguar\Dimension|Jaguar\CanvasInterface|file|null $source = null, integer $quality = 40, boolean $saveAlpha = true, mixed $filter = Jaguar\Format\Png::ALL_FILTERS )

construct new png canvas

construct new png canvas

Parameters

$source
Jaguar\Dimension|Jaguar\CanvasInterface|file|null
$source
$quality
integer
$quality default 40
$saveAlpha
boolean
$saveAlpha default true
$filter

Throws

Jaguar\Exception\InvalidDimensionException
Jaguar\Exception\CanvasCreationException

Overrides

Jaguar\CompressableCanvas::__construct
public Jaguar\Format\Png
# setSaveAlpha( boolean $bool )

Save Alpha Channel Information

Save Alpha Channel Information

Sets the flag to attempt to save full alpha channel information (as opposed to single-color transparency) when saving PNG images.

Also Note that the alphaBelnding will be set to false in order to enable this option.

Note Alpha channel is not supported by all browsers.

Parameters

$bool
boolean
$bool

Returns

Jaguar\Format\Png
public boolean
# getSaveAlpha( )

Get Save Alpha

Get Save Alpha

Check if the channel information will be saved with canvas or not

Returns

boolean
public Jaguar\Format\Png
# setFilter( integer $filter )

Set the png filter constant

Set the png filter constant

Parameters

$filter
integer
$filter

Returns

Jaguar\Format\Png
public integer
# getFilter( )

Get the png filter constant

Get the png filter constant

Returns

integer
public static boolean
# isPngFile( string $filename )

Check if the given file is png file

Check if the given file is png file

Parameters

$filename
string
$filename

Returns

boolean
true if png file,false otherwise

Methods inherited from Jaguar\CompressableCanvas

getQuality(), setQuality()

Methods inherited from Jaguar\AbstractCanvas

__clone(), __toString(), alphaBlending(), create(), destroy(), draw(), fill(), fromCanvas(), fromFile(), fromString(), getColorAt(), getCopy(), getDimension(), getHandler(), getHeight(), getPixel(), getWidth(), isGdResource(), isHandlerSet(), isTrueColor(), paste(), save(), setHandler()

Magic methods summary

Constants summary

integer NO_FILTER PNG_NO_FILTER
#
integer FILTER_NONE PNG_FILTER_NONE
#
integer FILTER_SUB PNG_FILTER_SUB
#
integer FILTER_UP PNG_FILTER_UP
#
integer FILTER_AVG PNG_FILTER_AVG
#
integer FILTER_PAETH PNG_FILTER_PAETH
#
integer ALL_FILTERS PNG_ALL_FILTERS
#

Constants inherited from Jaguar\CompressableCanvas

QUALITY_DRAFT, QUALITY_HIGH, QUALITY_LOW, QUALITY_MAX, QUALITY_MED

Jaguar - PHP Graphic Library API documentation generated by ApiGen 2.8.0