Conditions | 1 |
Paths | 1 |
Total Lines | 25 |
Code Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
46 | public function execute($phpthumb) |
||
47 | { |
||
48 | $currentDimensions = $phpthumb->getCurrentDimensions(); |
||
49 | $height = $currentDimensions['height']; |
||
50 | $oldImage = $phpthumb->getOldImage(); |
||
51 | $watermarkImage = $this->watermarkThumb->getOldImage(); |
||
52 | |||
53 | $watermarkCurrentDimensions = $this->watermarkThumb->getCurrentDimensions(); |
||
54 | $watermarkWidth = $watermarkCurrentDimensions['width']; |
||
55 | $watermarkHeight = $watermarkCurrentDimensions['height']; |
||
56 | $positionY = ($height - $watermarkHeight) - $this->position[1]; |
||
57 | |||
58 | imagecopy( |
||
59 | $oldImage, |
||
60 | $watermarkImage, |
||
61 | $this->position[0], |
||
62 | $positionY, |
||
63 | 0, |
||
64 | 0, |
||
65 | $watermarkWidth, |
||
66 | $watermarkHeight |
||
67 | ); |
||
68 | |||
69 | return $phpthumb; |
||
70 | } |
||
71 | } |
||
72 |