[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-admin/includes/ -> image-edit.php (summary)

WordPress Image Editor

File Size: 1046 lines (38 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 11 functions

  wp_image_editor()
  wp_stream_image()
  wp_save_image_file()
  _image_get_preview_ratio()
  _rotate_image_resource()
  _flip_image_resource()
  _crop_image_resource()
  image_edit_apply_changes()
  stream_preview_image()
  wp_restore_image()
  wp_save_image()

Functions
Functions that are not part of a class:

wp_image_editor( $post_id, $msg = false )   X-Ref
Loads the WP image-editing interface.

param: int          $post_id Attachment post ID.
param: false|object $msg     Optional. Message to display for image editor updates or errors.
since: 2.9.0

wp_stream_image( $image, $mime_type, $attachment_id )   X-Ref
Streams image in WP_Image_Editor to browser.

return: bool True on success, false on failure.
param: WP_Image_Editor $image         The image editor instance.
param: string          $mime_type     The mime type of the image.
param: int             $attachment_id The image's attachment post ID.
since: 2.9.0

wp_save_image_file( $filename, $image, $mime_type, $post_id )   X-Ref
Saves image to file.

return: bool True on success, false on failure.
param: string          $filename  Name of the file to be saved.
param: WP_Image_Editor $image     The image editor instance.
param: string          $mime_type The mime type of the image.
param: int             $post_id   Attachment post ID.
since: 2.9.0

_image_get_preview_ratio( $w, $h )   X-Ref
Image preview ratio. Internal use only.

return: float|int Image preview ratio.
param: int $w Image width in pixels.
param: int $h Image height in pixels.
since: 2.9.0

_rotate_image_resource( $img, $angle )   X-Ref
Returns an image resource. Internal use only.

return: resource|GdImage|false GD image resource or GdImage instance, false otherwise.
param: resource|GdImage  $img   Image resource.
param: float|int         $angle Image rotation angle, in degrees.
since: 2.9.0

_flip_image_resource( $img, $horz, $vert )   X-Ref
Flips an image resource. Internal use only.

return: resource|GdImage (maybe) flipped image resource or GdImage instance.
param: resource|GdImage $img  Image resource or GdImage instance.
param: bool             $horz Whether to flip horizontally.
param: bool             $vert Whether to flip vertically.
since: 2.9.0

_crop_image_resource( $img, $x, $y, $w, $h )   X-Ref
Crops an image resource. Internal use only.

return: resource|GdImage (maybe) cropped image resource or GdImage instance.
param: resource|GdImage $img Image resource or GdImage instance.
param: float            $x   Source point x-coordinate.
param: float            $y   Source point y-coordinate.
param: float            $w   Source width.
param: float            $h   Source height.
since: 2.9.0

image_edit_apply_changes( $image, $changes )   X-Ref
Performs group of changes on Editor specified.

return: WP_Image_Editor WP_Image_Editor instance with changes applied.
param: WP_Image_Editor $image   WP_Image_Editor instance.
param: array           $changes Array of change operations.
since: 2.9.0

stream_preview_image( $post_id )   X-Ref
Streams image in post to browser, along with enqueued changes
in `$_REQUEST['history']`.

return: bool True on success, false on failure.
param: int $post_id Attachment post ID.
since: 2.9.0

wp_restore_image( $post_id )   X-Ref
Restores the metadata for a given attachment.

return: stdClass Image restoration message object.
param: int $post_id Attachment post ID.
since: 2.9.0

wp_save_image( $post_id )   X-Ref
Saves image to post, along with enqueued changes
in `$_REQUEST['history']`.

return: stdClass
param: int $post_id Attachment post ID.
since: 2.9.0



Generated: Thu Nov 21 01:00:03 2024 Cross-referenced by PHPXref 0.7.1