This class includes functions for image manipulation
- Class name: ImageManagerCore
- Source: classes/ImageManager.php line 32
- checkImageMemoryLimit
- create
- createWhiteImage
- cut
- getMimeTypeByExtension
- isCorrectImageFileExt
- isRealImage
- resize
- thumbnail
- validateIconUpload
- validateUpload
- write
boolean ImageManagerCore::checkImageMemoryLimit($image)
Check if memory limit is too long or not
- Visibility: public
- This method is static.
- Source: classes/ImageManager.php line 91
- $image mixed
resource ImageManagerCore::create(string $type, string $filename)
Create an image with GD extension from a given type
- Visibility: public
- This method is static.
- Source: classes/ImageManager.php line 351
- $type string
- $filename string
resource ImageManagerCore::createWhiteImage(integer $width, integer $height)
Create an empty image with white background
- Visibility: public
- This method is static.
- Source: classes/ImageManager.php line 377
- $width integer
- $height integer
boolean ImageManagerCore::cut(array $src_file, string $dst_file, integer $dst_width, integer $dst_height, string $file_type, integer $dst_x, integer $dst_y)
Cut image
- Visibility: public
- This method is static.
- Source: classes/ImageManager.php line 316
- $src_file array - Origin filename
- $dst_file string - Destination filename
- $dst_width integer - Desired width
- $dst_height integer - Desired height
- $file_type string
- $dst_x integer
- $dst_y integer
string ImageManagerCore::getMimeTypeByExtension(string $file_name)
Return the mime type by the file extension
- Visibility: public
- This method is static.
- Source: classes/ImageManager.php line 424
- $file_name string
boolean ImageManagerCore::isCorrectImageFileExt($filename)
Check if image file extension is correct
- Visibility: public
- This method is static.
- Source: classes/ImageManager.php line 246
- $filename mixed - real filename
boolean ImageManagerCore::isRealImage(string $filename, string $file_mime_type, array $mime_type_list)
Check if file is a real image
- Visibility: public
- This method is static.
- Source: classes/ImageManager.php line 202
- $filename string - File path to check
- $file_mime_type string - File known mime type (generally from $_FILES)
- $mime_type_list array - Allowed MIME types
boolean ImageManagerCore::resize(string $src_file, string $dst_file, integer $dst_width, integer $dst_height, string $file_type, $force_type)
Resize, cut and optimize image
- Visibility: public
- This method is static.
- Source: classes/ImageManager.php line 120
- $src_file string - Image object from $_FILE
- $dst_file string - Destination filename
- $dst_width integer - Desired width (optional)
- $dst_height integer - Desired height (optional)
- $file_type string
- $force_type mixed
string ImageManagerCore::thumbnail(string $image, string $cache_image, integer $size, string $image_type, boolean $disable_cache)
Generate a cached thumbnail for object lists (eg. carrier, order states.
..etc)
- Visibility: public
- This method is static.
- Source: classes/ImageManager.php line 44
- $image string - Real image filename
- $cache_image string - Cached filename
- $size integer - Desired size
- $image_type string - Image type
- $disable_cache boolean - When turned on a timestamp will be added to the image URI to disable the HTTP cache
boolean|string ImageManagerCore::validateIconUpload(array $file, integer $max_file_size)
Validate icon upload
- Visibility: public
- This method is static.
- Source: classes/ImageManager.php line 288
- $file array - Upload $_FILE value
- $max_file_size integer - Maximum upload size
boolean|string ImageManagerCore::validateUpload(array $file, integer $max_file_size)
Validate image upload (check image type and weight)
- Visibility: public
- This method is static.
- Source: classes/ImageManager.php line 270
- $file array - Upload $_FILE value
- $max_file_size integer - Maximum upload size
boolean ImageManagerCore::write(string $type, resource $resource, string $filename)
Generate and write image
- Visibility: public
- This method is static.
- Source: classes/ImageManager.php line 393
- $type string
- $resource resource
- $filename string