WP_Image_Editor
class WP_Image_Editor
// Constructor: function Object() { [native code] } Base image editor class from which implementations extend
Methods 23 methods
| Method / Return | Description |
|---|---|
| __construct() void | Each instance handles a single file.
Parameters: $file: mixed |
| test() bool | Checks to see if current environment supports the editor chosen.
Parameters: $args: mixed |
| supports_mime_type() bool | Checks to see if editor supports the mime-type specified.
Parameters: $mime_type: mixed |
| load() (true | Loads image from $this->file into editor. |
| save() (array | Saves current image to file.
Parameters: $destfilename: mixed, $mime_type: mixed |
| resize() (true | Resizes current image.
Parameters: $max_w: mixed, $max_h: mixed, $crop: mixed |
| multi_resize() array | Resize multiple images from a single source.
Parameters: $sizes: mixed |
| crop() (true | Crops Image.
Parameters: $src_x: mixed, $src_y: mixed, $src_w: mixed, $src_h: mixed, $dst_w: mixed, $dst_h: mixed, $src_abs: mixed |
| rotate() (true | Rotates current image counter-clockwise by $angle.
Parameters: $angle: mixed |
| flip() (true | Flips current image.
Parameters: $horz: mixed, $vert: mixed |
| stream() (true | Streams current image to browser.
Parameters: $mime_type: mixed |
| get_size() int[] | Gets dimensions of image. |
| update_size() true | Sets current image size.
Parameters: $width: mixed, $height: mixed |
| get_quality() int | Gets the Image Compression quality on a 1-100% scale. |
| set_quality() (true | Sets Image Compression quality on a 1-100% scale.
Parameters: $quality: mixed, $dims: mixed |
| get_default_quality() int | Returns the default compression quality setting for the mime type.
Parameters: $mime_type: mixed |
| get_output_format() array | Returns preferred mime-type and extension based on provided
Parameters: $filename: mixed, $mime_type: mixed |
| generate_filename() string | Builds an output filename based on current file, and adding proper suffix
Parameters: $suffix: mixed, $dest_path: mixed, $extension: mixed |
| get_suffix() (string | Builds and returns proper suffix for file based on height and width. |
| maybe_exif_rotate() (bool | Check if a JPEG image has EXIF Orientation tag and rotate it if needed. |
| make_image() bool | Either calls editor's save function or handles file as a stream.
Parameters: $filename: mixed, $callback: mixed, $arguments: mixed |
| get_mime_type() (string | Returns first matched mime-type from extension,
Parameters: $extension: mixed |
| get_extension() (string | Returns first matched extension from Mime-type,
Parameters: $mime_type: mixed |
Properties
| Property / Type | Description |
|---|---|
| $file mixed public | No description available. |
| $size mixed public | No description available. |
| $mime_type mixed public | No description available. |
| $output_mime_type mixed public | No description available. |
| $default_mime_type mixed public | No description available. |
| $quality mixed public | No description available. |
| $default_quality mixed public | No description available. |