function ctools_stylizer_image_processor::merge
Merge two images together, preserving alpha transparency.
3 calls to ctools_stylizer_image_processor::merge()
- ctools_stylizer_image_processor::command_merge_from in includes/
stylizer.inc - Copy the contents of one workspace into the current workspace.
- ctools_stylizer_image_processor::command_merge_from_file in includes/
stylizer.inc - Blend an image into the current workspace.
- ctools_stylizer_image_processor::command_merge_to in includes/
stylizer.inc
File
-
includes/
stylizer.inc, line 634
Class
Code
function merge(&$from, &$to, $x, $y) {
// Blend over template.
$width = imagesx($from);
$height = imagesy($from);
// Re-enable alpha blending to make sure transparency merges.
imagealphablending($to, TRUE);
imagecopy($to, $from, $x, $y, 0, 0, $width, $height);
imagealphablending($to, FALSE);
}