WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Difference between revisions of "Class Reference/WP Image Editor"

(This example code has nothing to do with the class)
Line 1: Line 1:
 
===Change Log===
 
===Change Log===
 
* Since [[Version_3.5|3.5.0]]
 
* Since [[Version_3.5|3.5.0]]
 
== Example ==
 
 
<pre>
 
$image = wp_get_image_editor( 'cool_image.jpg' );
 
if ( ! is_wp_error( $image ) ) {
 
$image->rotate( 90 );
 
$image->resize( 300, 300, true );
 
$image->save( 'new_image.jpg' );
 
}
 
</pre>
 

Revision as of 19:54, 15 December 2012

Change Log