1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс Image

Открытые члены

 __construct ($file=null)
 setEngine (Image\Engine $engine)
 getExifData ()
 getInfo ($flashEnabled=false)
 load ()
 rotate ($angle, Image\Color $bgColor=null)
 flipVertical ()
 flipHorizontal ()
 autoRotate ($orientation)
 setOrientation ($orientation)
 resize (Image\Rectangle $source, Image\Rectangle $destination)
 blur (int $sigma)
 filter (Image\Mask $mask)
 drawWatermark (Image\Watermark $watermark)
 save ($quality=95)
 saveAs ($file, $quality=95, $format=null)
 getWidth ()
 getHeight ()
 getDimensions ()
 exceedsMaxSize ()
 clear ()

Поля данных

const FORMAT_PNG = \IMAGETYPE_PNG
const FORMAT_JPEG = \IMAGETYPE_JPEG
const FORMAT_GIF = \IMAGETYPE_GIF
const FORMAT_BMP = \IMAGETYPE_BMP
const FORMAT_WEBP = \IMAGETYPE_WEBP
const RESIZE_PROPORTIONAL_ALT = 0
const RESIZE_PROPORTIONAL = 1
const RESIZE_EXACT = 2

Защищенные члены

 setFileAttributes ($file)

Защищенные данные

 $file
 $engine

Подробное описание

См. определение в файле Image.php строка 13

Конструктор(ы)

◆ __construct()

__construct ( $file = null)

Image constructor.

Аргументы
string | null$filePhysical file name.

См. определение в файле Image.php строка 36

Методы

◆ autoRotate()

autoRotate ( $orientation)

Fixes wierd orientation (from EXIF).

Аргументы
int$orientation
Возвращает
bool True if it was fixed.

См. определение в файле Image.php строка 131

◆ blur()

blur ( int $sigma)

Blurs the image.

Аргументы
int$sigma
Возвращает
bool

См. определение в файле Image.php строка 192

◆ clear()

clear ( )

Clears all resources associated to the image.

См. определение в файле Image.php строка 315

◆ drawWatermark()

drawWatermark ( Image\Watermark $watermark)

Draws a text or image watermark on the image (depending on type).

Аргументы
Image\Watermark$watermark
Возвращает
bool

См. определение в файле Image.php строка 212

◆ exceedsMaxSize()

exceedsMaxSize ( )

Returns true if the image exceeds maximum dimensions in options.

Возвращает
bool

См. определение в файле Image.php строка 307

◆ filter()

filter ( Image\Mask $mask)

Applies a mask to the image (convolution).

Аргументы
Image\Mask$mask
Возвращает
bool

См. определение в файле Image.php строка 202

◆ flipHorizontal()

flipHorizontal ( )

Flips the image horizontally.

Возвращает
bool

См. определение в файле Image.php строка 121

◆ flipVertical()

flipVertical ( )

Flips the image vertically.

Возвращает
bool

См. определение в файле Image.php строка 112

◆ getDimensions()

getDimensions ( )

Returns actual width and height in the Rectangle object.

Возвращает
Image\Rectangle

См. определение в файле Image.php строка 297

◆ getExifData()

getExifData ( )

Returns EXIF data from the image.

Возвращает
array

См. определение в файле Image.php строка 69

◆ getHeight()

getHeight ( )

Returns actual height of the image.

Возвращает
int

См. определение в файле Image.php строка 288

◆ getInfo()

getInfo ( $flashEnabled = false)

Returns the image file info, including the image size.

Аргументы
bool$flashEnabled
Возвращает
Image\Info|null

См. определение в файле Image.php строка 79

◆ getWidth()

getWidth ( )

Returns actual width of the image.

Возвращает
int

См. определение в файле Image.php строка 279

◆ load()

load ( )

Reads the image data from the file.

Возвращает
bool

См. определение в файле Image.php строка 88

◆ resize()

resize ( Image\Rectangle $source,
Image\Rectangle $destination )

Resizes the image.

Аргументы
Image\Rectangle$source
Image\Rectangle$destination
Возвращает
bool

См. определение в файле Image.php строка 182

◆ rotate()

rotate ( $angle,
Image\Color $bgColor = null )

Rotates the image clockwise.

Аргументы
float$angle
Image\Color | null$bgColor
Возвращает
bool

См. определение в файле Image.php строка 99

◆ save()

save ( $quality = 95)

Saves the image to the current file.

Аргументы
int$qualityPercents, normalized to 95 on incorrect values.
Возвращает
bool

См. определение в файле Image.php строка 230

◆ saveAs()

saveAs ( $file,
$quality = 95,
$format = null )

Saves the image to the specified file.

Аргументы
string$filePhysical file.
int$qualityPercents, normalized to 95 on incorrect values.
int | null$formatOne of the Image::FORMAT_* constants.
Возвращает
bool

См. определение в файле Image.php строка 253

◆ setEngine()

setEngine ( Image\Engine $engine)

Sets image processing engine.

Аргументы
Image\Engine$engine

См. определение в файле Image.php строка 55

◆ setFileAttributes()

setFileAttributes ( $file)
protected

См. определение в файле Image.php строка 269

◆ setOrientation()

setOrientation ( $orientation)

Sets the image orientation.

Аргументы
$orientation
Возвращает
bool

См. определение в файле Image.php строка 171

Поля

◆ $engine

$engine
protected

См. определение в файле Image.php строка 30

◆ $file

$file
protected

См. определение в файле Image.php строка 27

◆ FORMAT_BMP

const FORMAT_BMP = \IMAGETYPE_BMP

См. определение в файле Image.php строка 19

◆ FORMAT_GIF

const FORMAT_GIF = \IMAGETYPE_GIF

См. определение в файле Image.php строка 18

◆ FORMAT_JPEG

const FORMAT_JPEG = \IMAGETYPE_JPEG

См. определение в файле Image.php строка 17

◆ FORMAT_PNG

const FORMAT_PNG = \IMAGETYPE_PNG

См. определение в файле Image.php строка 16

◆ FORMAT_WEBP

const FORMAT_WEBP = \IMAGETYPE_WEBP

См. определение в файле Image.php строка 20

◆ RESIZE_EXACT

const RESIZE_EXACT = 2

См. определение в файле Image.php строка 25

◆ RESIZE_PROPORTIONAL

const RESIZE_PROPORTIONAL = 1

См. определение в файле Image.php строка 24

◆ RESIZE_PROPORTIONAL_ALT

const RESIZE_PROPORTIONAL_ALT = 0

См. определение в файле Image.php строка 23


Объявления и описания членов класса находятся в файле: