﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
19889	Image Editor doesn't apply changes to custom image sizes	Otto42		"The built in image editor doesn't apply changes like cropping, rotation, etc. to image sizes added using add_image_size or similar methods.

This is because the code in image-edit.php is directly looking for the image sizes in the options table, which only valid for the built-in sizes, not for custom image sizes.

Specifically, in the wp_save_image function in image-edit.php, this code is incorrect:

{{{
$crop = $nocrop ? false : get_option(""{$size}_crop"");
$resized = image_make_intermediate_size($new_path, get_option(""{$size}_size_w""), get_option(""{$size}_size_h""), $crop );
}}}

The fix to this is to make the wp_save_image function aware of custom sizes in the $_wp_additional_image_sizes global, and to use the options data as a fallback (for the built in sizes).

Patch for trunk attached. Tested on trunk install with no obvious side effects. Patched version correctly creates the custom image sizes with the applied editing changes, and deletes them properly when the image is deleted in the admin. Meta data thus created looks correct as well.
"	defect (bug)	reopened	normal	3.6	Media	3.3.1	normal		has-patch	toni.viemero@… studiograsshopper dreamwhisper mpretty@… anatolbroder dromsey@… sabreuse jer@…
