Rundiz\Image

AbstractProperties
in package

AbstractYes

Abstract properties class.

For use properties between classes without implement interface.

Tags
since
3.1.0

Table of Contents

Constants

RDIERROR_CALCULATEFAILED_USE_RESIZENORATIO  = 4
Unable to calculated, please try to calculate on your own and use `resizeNoRatio()` instead.
RDIERROR_CROP_UNKNOWNIMG  = 5
Unable to crop this kind of image.
RDIERROR_FLIP_NOTSUPPORTED  = 9
Not support flip for current PHP version. (PHP 5.5 or newer is required to use GD flip.)
RDIERROR_FLIP_UNKNOWIMG  = 8
Unable to flip this kind of image.
RDIERROR_IMAGEMAGICK_NOTMEETREQUIREMENT  = 21
ImageMagick version does not meet requirement.
RDIERROR_IMAGICK_NOTLOAD  = 18
Imagick extension was not loaded.
RDIERROR_IMAGICK_NOTMEETREQUIREMENT  = 19
Imagick version does not meet requirement.
RDIERROR_IMAGICK_VERSIONUNKNOW  = 20
Could not verify Imagick version.
RDIERROR_RESIZE_UNKNOWIMG  = 6
Unable to resize this kind of image.
RDIERROR_ROTATE_UNKNOWIMG  = 7
Unable to rotate this kind of image.
RDIERROR_SAVE_FAILED  = 13
Failed to save an image.
RDIERROR_SAVE_UNSUPPORT  = 12
Unable to save to this extension. or target file extension is not supported.
RDIERROR_SHOW_FAILED  = 15
Failed to show an image to browser.
RDIERROR_SHOW_UNSUPPORT  = 14
Unable to show image in this extension. File extension is not supported.
RDIERROR_SRC_NOTEXISTS  = 3
Source file is not exists.
RDIERROR_SRC_NOTIMAGE  = 2
Source file is not image.
RDIERROR_SRC_UNKNOWN  = 16
Unable to set source from this kind of image.
RDIERROR_SRC_WEBP_ALPHA_NOTSUPPORTED  = 1
Not support alpha transparency WebP for current PHP version.
RDIERROR_SRC_WEBP_ANIMATED_NOTSUPPORTED  = 22
Not support animated WebP for current PHP version (or current ImageMatick version).
RDIERROR_WMI_NOTEXISTS  = 11
Watermark image not exists.
RDIERROR_WMI_UNKNOWIMG  = 10
Unable to set watermark from this kind of image.
RDIERROR_WMT_FONT_NOTEXISTS  = 17
Watermark text font file is not exists.

Properties

$allow_resize_larger  : bool
Allow to set resize larger than source image.
$destination_image_height  : int
$destination_image_width  : int
$jpg_quality  : int
JPEG & WebP quality.
$last_modified_image_height  : int
$last_modified_image_width  : int
$master_dim  : string
Master dimension.
$png_quality  : int
PNG quality.
$source_image_data  : array<string|int, mixed>
$source_image_ext  : string
$source_image_height  : int
$source_image_mime  : string
$source_image_path  : string
$source_image_type  : string
$source_image_width  : int
$status  : bool
Contain status of action methods.
$status_msg  : string
Contain status error message of action methods.
$statusCode  : int
Contain status code refer from class constants.
$watermark_image_height  : int
$watermark_image_type  : string
$watermark_image_width  : int
$wmTextBottomPadding  : int
Add bottom padding to watermark text to let characters that long to the bottom can be displayed. Example p, g, ฤ, ฎ, etc.<br> This bottom padding should be different for each font size.
$wmTextBoundingBoxYPadding  : int
Watermark text bounding box vertical (Y) padding.
$destination_image_height  : int
$destination_image_width  : int
$last_modified_image_height  : int
$last_modified_image_width  : int
$source_image_ext  : string
$source_image_height  : int
$source_image_mime  : string
$source_image_path  : string
$source_image_type  : string
$source_image_width  : int
$watermark_image_height  : int
$watermark_image_type  : string
$watermark_image_width  : int

Constants

RDIERROR_CALCULATEFAILED_USE_RESIZENORATIO

Unable to calculated, please try to calculate on your own and use `resizeNoRatio()` instead.

public mixed RDIERROR_CALCULATEFAILED_USE_RESIZENORATIO = 4

RDIERROR_CROP_UNKNOWNIMG

Unable to crop this kind of image.

since 3.1.4 There is no need to use this anymore.

public mixed RDIERROR_CROP_UNKNOWNIMG = 5

RDIERROR_FLIP_NOTSUPPORTED

Not support flip for current PHP version. (PHP 5.5 or newer is required to use GD flip.)

public mixed RDIERROR_FLIP_NOTSUPPORTED = 9

RDIERROR_FLIP_UNKNOWIMG

Unable to flip this kind of image.

since 3.1.4 There is no need to use this anymore.

public mixed RDIERROR_FLIP_UNKNOWIMG = 8

RDIERROR_IMAGEMAGICK_NOTMEETREQUIREMENT

ImageMagick version does not meet requirement.

public mixed RDIERROR_IMAGEMAGICK_NOTMEETREQUIREMENT = 21

RDIERROR_IMAGICK_NOTLOAD

Imagick extension was not loaded.

public mixed RDIERROR_IMAGICK_NOTLOAD = 18

RDIERROR_IMAGICK_NOTMEETREQUIREMENT

Imagick version does not meet requirement.

public mixed RDIERROR_IMAGICK_NOTMEETREQUIREMENT = 19

RDIERROR_IMAGICK_VERSIONUNKNOW

Could not verify Imagick version.

public mixed RDIERROR_IMAGICK_VERSIONUNKNOW = 20

RDIERROR_RESIZE_UNKNOWIMG

Unable to resize this kind of image.

since 3.1.4 There is no need to use this anymore.

public mixed RDIERROR_RESIZE_UNKNOWIMG = 6

RDIERROR_ROTATE_UNKNOWIMG

Unable to rotate this kind of image.

since 3.1.4 There is no need to use this anymore.

public mixed RDIERROR_ROTATE_UNKNOWIMG = 7

RDIERROR_SAVE_FAILED

Failed to save an image.

public mixed RDIERROR_SAVE_FAILED = 13

RDIERROR_SAVE_UNSUPPORT

Unable to save to this extension. or target file extension is not supported.

public mixed RDIERROR_SAVE_UNSUPPORT = 12

RDIERROR_SHOW_FAILED

Failed to show an image to browser.

public mixed RDIERROR_SHOW_FAILED = 15

RDIERROR_SHOW_UNSUPPORT

Unable to show image in this extension. File extension is not supported.

public mixed RDIERROR_SHOW_UNSUPPORT = 14

RDIERROR_SRC_NOTEXISTS

Source file is not exists.

public mixed RDIERROR_SRC_NOTEXISTS = 3

RDIERROR_SRC_NOTIMAGE

Source file is not image.

public mixed RDIERROR_SRC_NOTIMAGE = 2

RDIERROR_SRC_UNKNOWN

Unable to set source from this kind of image.

public mixed RDIERROR_SRC_UNKNOWN = 16

RDIERROR_SRC_WEBP_ALPHA_NOTSUPPORTED

Not support alpha transparency WebP for current PHP version.

public mixed RDIERROR_SRC_WEBP_ALPHA_NOTSUPPORTED = 1

RDIERROR_SRC_WEBP_ANIMATED_NOTSUPPORTED

Not support animated WebP for current PHP version (or current ImageMatick version).

public mixed RDIERROR_SRC_WEBP_ANIMATED_NOTSUPPORTED = 22
Tags
since
3.1.4

RDIERROR_WMI_NOTEXISTS

Watermark image not exists.

public mixed RDIERROR_WMI_NOTEXISTS = 11

RDIERROR_WMI_UNKNOWIMG

Unable to set watermark from this kind of image.

public mixed RDIERROR_WMI_UNKNOWIMG = 10

RDIERROR_WMT_FONT_NOTEXISTS

Watermark text font file is not exists.

public mixed RDIERROR_WMT_FONT_NOTEXISTS = 17

Properties

$allow_resize_larger

Allow to set resize larger than source image.

public bool $allow_resize_larger = false

Set to true to allow, false to disallow. Default is false.

$destination_image_height write-only

public int $destination_image_height

Destination image height. For internal use only.

$destination_image_width write-only

public int $destination_image_width

Destination image width. For internal use only.

$jpg_quality

JPEG & WebP quality.

public int $jpg_quality = 100

Quality from 0 (worst quality, smallest file) to 100 (best quality, biggest file). Default is 100.

$last_modified_image_height write-only

public int $last_modified_image_height

Last modified image height. For internal use only.

$last_modified_image_width write-only

public int $last_modified_image_width

Last modified image width. For internal use only.

$master_dim

Master dimension.

public string $master_dim = 'auto'

Master dimension value is 'auto', 'width', or 'height'. Default is 'auto'.

$png_quality

PNG quality.

public int $png_quality = 0

Compression level from 0 (no compression) to 9. Default is 0.

$source_image_data

public array<string|int, mixed> $source_image_data

Source image data.

Tags
see
ImageTrait::getImageFileData()

$source_image_ext write-only

public string $source_image_ext

Source image file extension. For internal use only.

$source_image_height write-only

public int $source_image_height

Source image height. For internal use only.

$source_image_mime write-only

public string $source_image_mime

Source image mime type. Example image/jpeg. For internal use only.

$source_image_path write-only

public string $source_image_path

Real full path to source image file. For internal use only.

$source_image_type write-only

public string $source_image_type

Source image type. Use with PHP predefined constants IMAGETYPE_XXX only. For internal use only.

$source_image_width write-only

public int $source_image_width

Source image width. For internal use only.

$status

Contain status of action methods.

public bool $status = false

Return false if there is something error.

$status_msg

Contain status error message of action methods.

public string $status_msg = null

Return error message. Default is null.

$statusCode

Contain status code refer from class constants.

public int $statusCode = null

Return status code. See class constants. Default is null.

$watermark_image_height write-only

public int $watermark_image_height

Watermark image height. For internal use only.

$watermark_image_type write-only

public string $watermark_image_type

Watermark image type. Use with PHP predefined constants IMAGETYPE_XXX only. For internal use only.

$watermark_image_width write-only

public int $watermark_image_width

Watermark image width. For internal use only.

$wmTextBottomPadding

Add bottom padding to watermark text to let characters that long to the bottom can be displayed. Example p, g, ฤ, ฎ, etc.<br> This bottom padding should be different for each font size.

public int $wmTextBottomPadding = 5

Set the number of pixels to add to watermark text at the bottom. Default is 5, previous version was 5.

$wmTextBoundingBoxYPadding

Watermark text bounding box vertical (Y) padding.

public int $wmTextBoundingBoxYPadding = 0

Set the number of watermark text bounding box padding. Default is 0.

$destination_image_height

protected int $destination_image_height

Destination image height.

$destination_image_width

protected int $destination_image_width

Destination image width.

$last_modified_image_height

protected int $last_modified_image_height

Last modified image height.

$last_modified_image_width

protected int $last_modified_image_width

Last modified image width.

$source_image_ext

protected string $source_image_ext

Source image file extension.

$source_image_mime

protected string $source_image_mime

Source image mime type. Example image/jpeg.

$source_image_path

protected string $source_image_path = ''

Real full path to source image file.

$watermark_image_height

protected int $watermark_image_height

Watermark image height.

$watermark_image_width

protected int $watermark_image_width

Watermark image width.


        
On this page

Search results