WP_Image_Editor::crop( int $src_x, int $src_y, int $src_w, int $src_h, int $dst_w = null, int $dst_h = null, bool $src_abs = false )

Crops Image.

Parameters Parameters


(int) (Required) The start x position to crop from.


(int) (Required) The start y position to crop from.


(int) (Required) The width to crop.


(int) (Required) The height to crop.


(int) (Optional) The destination width.

Default value: null


(int) (Optional) The destination height.

Default value: null


(bool) (Optional) If the source crop points are absolute.

Default value: false

Top ↑

Return Return


Top ↑

Source Source

File: wp-includes/class-wp-image-editor.php

	abstract public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false );

Top ↑

Changelog Changelog

Version Description
3.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

Top ↑

You must log in before being able to contribute a note or feedback.