diff --git a/admin/derivatives_build.php b/admin/derivatives_build.php new file mode 100644 index 000000000..4203124ac --- /dev/null +++ b/admin/derivatives_build.php @@ -0,0 +1,30 @@ +assign('derivatives', array_keys(ImageStdParams::get_defined_type_map())); + +$template->set_filename('derivatives', 'derivatives_build.tpl'); +$template->assign_var_from_handle('ADMIN_CONTENT', 'derivatives'); +?> \ No newline at end of file diff --git a/admin/include/functions.php b/admin/include/functions.php index 59e59e5c2..84bae9154 100644 --- a/admin/include/functions.php +++ b/admin/include/functions.php @@ -200,11 +200,8 @@ SELECT $files = array(); $files[] = get_element_path($row); - if (!empty($row['representative_ext'])) { - $pi = pathinfo($row['path']); - $file_wo_ext = get_filename_wo_extension($pi['basename']); $files[] = original_to_representative( $files[0], $row['representative_ext']); } diff --git a/admin/include/image.class.php b/admin/include/image.class.php index 03cf419a4..c8e61a829 100644 --- a/admin/include/image.class.php +++ b/admin/include/image.class.php @@ -704,6 +704,7 @@ class image_gd implements imageInterface // Place the source image in the destination image imagecopy($cut, $ioverlay, 0, 0, 0, 0, $ow, $oh); imagecopymerge($this->image, $cut, $x, $y, 0, 0, $ow, $oh, $opacity); + imagedestroy($cut); return true; } diff --git a/admin/themes/default/template/derivatives.tpl b/admin/themes/default/template/derivatives.tpl index 59f6344a7..dcf52a4ec 100644 --- a/admin/themes/default/template/derivatives.tpl +++ b/admin/themes/default/template/derivatives.tpl @@ -22,6 +22,7 @@ {/literal}{/html_head} +