CropBalanced
This class calculates the most interesting point in the image by:
todo |
Refactor to make cleaner |
---|---|
todo |
Rename the class to something more sensible |
getSpecialOffset(\Imagick $original, int $targetWidth, int $targetHeight) : array
\Imagick
int
int
array
getRandomEdgeOffset(\Imagick $original, int $targetWidth, int $targetHeight) : array
\Imagick
int
int
array
getOffsetBalanced(int $targetWidth, int $targetHeight) : array
todo |
refactor so it follows DRY |
---|---|
int
int
array
getHighestEnergyPoint(\Imagick $image) : array
\Imagick
array
start()
mark() : string
string
__construct(string $imagePath)
string
area(\Imagick $image) : int
\Imagick
int
resizeAndCrop(int $targetWidth, int $targetHeight) : boolean|\Imagick
int
int
boolean|\Imagick
getSafeResizeOffset(\Imagick $image, int $targetWidth, int $targetHeight) : array
\Imagick
int
int
array
rgb2bw(int $r, int $g, int $b) : int
see | |
---|---|
int
int
int
int
getEntropy(array $histogram, int $area) : float
array
int
float
start_time
var | |
---|---|
originalImage
var | |
---|---|