if($normalize = !$cropMode) {
$cropMode = Image::RESIZE_MODE_NORMALIZE;
}
$image = new ImageFromFile($imagePath);
if(!$w) {
$image->resizeByHeight($h, $normalize);
} else if(!$h) {
$image->resizeByWidth($w, $normalize);
} else {
$image->resize($w, $h, $cropMode);
}
$image->output();
-
Notifications
You must be signed in to change notification settings - Fork 0
aivazoff/image
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Image resizing and croping
Topics
Resources
Stars
Watchers
Forks
Packages 0
No packages published