Skip to content

Commit

Permalink
Fix: #5042 - watermarked images cropped incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
fisharebest committed Nov 30, 2024
1 parent ca7e3cf commit 0d7b2f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Factories/ImageFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,15 @@ public function createWatermark(int $width, int $height, MediaFile $media_file):
{
return $this->imageManager()
->read(input: Webtrees::ROOT_DIR . static::WATERMARK_FILE)
->contain(width: $width, height: $height);
->scale(width: $width, height: $height);
}

/**
* Add a watermark to an image.
*/
public function addWatermark(ImageInterface $image, ImageInterface $watermark): ImageInterface
{
return $image->place(element: $watermark, position: 'center');
return $image->place(element: $watermark, position: 'center');
}

/**
Expand Down

0 comments on commit 0d7b2f7

Please sign in to comment.