[ Index ]

WordPress Cross Reference

title

Body

[close]

/wp-includes/ -> class-wp-image-editor-gd.php (summary)

WordPress GD Image Editor

File Size: 442 lines (12 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_Image_Editor_GD:: (15 methods):
  __destruct()
  test()
  supports_mime_type()
  load()
  update_size()
  resize()
  _resize()
  multi_resize()
  crop()
  rotate()
  flip()
  save()
  _save()
  stream()
  make_image()


Class: WP_Image_Editor_GD  - X-Ref

WordPress Image Editor Class for Image Manipulation through GD

__destruct()   X-Ref
No description

test( $args = array()   X-Ref
Checks to see if current environment supports GD.

return: boolean

supports_mime_type( $mime_type )   X-Ref
Checks to see if editor supports the mime-type specified.

param: string $mime_type
return: boolean

load()   X-Ref
Loads image from $this->file into new GD Resource.

return: boolean|WP_Error True if loaded successfully; WP_Error on failure.

update_size( $width = false, $height = false )   X-Ref
Sets or updates current image size.

param: int $width
param: int $height

resize( $max_w, $max_h, $crop = false )   X-Ref
Resizes current image.
Wraps _resize, since _resize returns a GD Resource.

param: int $max_w
param: int $max_h
param: boolean $crop
return: boolean|WP_Error

_resize( $max_w, $max_h, $crop = false )   X-Ref
No description

multi_resize( $sizes )   X-Ref
Resize multiple images from a single source.

param: array $sizes {
return: array An array of resized images metadata by size.

crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false )   X-Ref
Crops Image.

param: string|int $src The source file or Attachment ID.
param: int $src_x The start x position to crop from.
param: int $src_y The start y position to crop from.
param: int $src_w The width to crop.
param: int $src_h The height to crop.
param: int $dst_w Optional. The destination width.
param: int $dst_h Optional. The destination height.
param: boolean $src_abs Optional. If the source crop points are absolute.
return: boolean|WP_Error

rotate( $angle )   X-Ref
Rotates current image counter-clockwise by $angle.
Ported from image-edit.php

param: float $angle
return: boolean|WP_Error

flip( $horz, $vert )   X-Ref
Flips current image.

returns: boolean|WP_Error
param: boolean $horz Flip along Horizontal Axis
param: boolean $vert Flip along Vertical Axis

save( $filename = null, $mime_type = null )   X-Ref
Saves current in-memory image to file.

param: string $destfilename
param: string $mime_type
return: array|WP_Error {'path'=>string, 'file'=>string, 'width'=>int, 'height'=>int, 'mime-type'=>string}

_save( $image, $filename = null, $mime_type = null )   X-Ref
No description

stream( $mime_type = null )   X-Ref
Returns stream of current image.

param: string $mime_type

make_image( $filename, $function, $arguments )   X-Ref
Either calls editor's save function or handles file as a stream.

param: string|stream $filename
param: callable $function
param: array $arguments
return: boolean



Generated: Tue Mar 25 01:41:18 2014 WordPress honlapkészítés: online1.hu