mirror of
https://github.com/Karaka-Management/oms-Labeling.git
synced 2026-01-23 14:58:40 +00:00
test fixes
This commit is contained in:
parent
a06c6c8c6d
commit
5c830a5d1f
|
|
@ -126,7 +126,12 @@ class Label
|
|||
return null;
|
||||
}
|
||||
|
||||
\imagecolortransparent($newIn, \imagecolorallocatealpha($newIn, 0, 0, 0, 127));
|
||||
$transparency = \imagecolorallocatealpha($newIn, 0, 0, 0, 127);
|
||||
if ($transparency === false) {
|
||||
return null;
|
||||
}
|
||||
|
||||
\imagecolortransparent($newIn, $transparency);
|
||||
\imagealphablending($newIn, false);
|
||||
\imagesavealpha($newIn, true);
|
||||
|
||||
|
|
@ -147,6 +152,9 @@ class Label
|
|||
}
|
||||
|
||||
$cut = \imagecreatetruecolor($srcW, $srcH);
|
||||
if ($cut === false) {
|
||||
return null;
|
||||
}
|
||||
|
||||
\imagecopy($cut, $im, 0, 0, $element->x, $element->y, $srcW, $srcH);
|
||||
\imagecopy($cut, $in, 0, 0, 0, 0, $srcW, $srcH);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user