baserCMS クラスリファレンス

Imageresizer
in package

Imagereizer

Table of Contents

Methods

_copyAndResize()  : GdImage|resource
ファイルをコピーし、リサイズする
resize()  : bool
画像をリサイズする

Methods

_copyAndResize()

ファイルをコピーし、リサイズする

public _copyAndResize(GdImage|resource $srcImage, GdImage|resource $newImage, int $srcWidth, int $srcHeight, int $newWidth, int $newHeight[, bool $trimming = false ]) : GdImage|resource
Parameters
$srcImage : GdImage|resource

ソースイメージオブジェクト

$newImage : GdImage|resource

リサイズイメージ格納用のイメージオブジェクト

$srcWidth : int

元の幅

$srcHeight : int

元の高さ

$newWidth : int

新しい幅

$newHeight : int

新しい高さ

$trimming : bool = false

トリミングするかどうか

Tags
checked
noTodo
Return values
GdImage|resource

新しいイメージオブジェクト

resize()

画像をリサイズする

public resize(string $imgPath[, string $savePath = null ][, int $newWidth = null ][, int $newHeight = null ][, bool $trimming = false ][, array<string|int, mixed> $quality = [] ]) : bool
Parameters
$imgPath : string

ソースファイルのパス

$savePath : string = null

保存先のパス

$newWidth : int = null

$newHeight : int = null

高さ

$trimming : bool = false

トリミングするかどうか

$quality : array<string|int, mixed> = []

圧縮レベル (JPEG: 100 (0-100), PNG: 6 (0-9))

Tags
checked
noTodo
Return values
bool

        
On this page

Search results