$parts = explode('x', substr($str, 0, -3));
$parts = array_map('trim', $parts);
echo $parts[0] . '-' . $parts[2] . '-' . $parts[1] . ' mm';
for( $x = 0; $x < $sx; $x++ ){
for( $y = 0; $y < $sy; $y++ ){
$colorxy = imagecolorat( $stamp, $x, $y );
$alphacolorxy = imagecolorallocatealpha( $stamp,
( $colorxy >> 16 ) & 0xFF,
( $colorxy >> 8 ) & 0xFF,
$colorxy & 0xFF,
$alpha
);
imagesetpixel($stamp, $x,$y, $alphacolorxy);
if( !imagesetpixel( $stamp, $x, $y, $alphacolorxy ) ){
echo "string";
return false;
}
}
}