Open Bogdaan opened 8 years ago
I guess your problem is to get the image width and height after resize after all, right?
@Gregwar yes resize works as expected, but after resize merge
place image on empty place (not image).
aspectRatio ( > 1 )
-------------
| empty |
| image |
| empty |
-------------
or aspectRatio ( < 1 )
---------------------------
| empty image empty |
---------------------------
For example other library have a method
Intervention\Image\Image insert(mixed $source, [string $position, [integer $x, integer $y]])
with position parameter:
And works as expected. May be similar method would be useful?
This is indeed a good idea to add this If you do a PR i'll review it
I have some issues with
merge
method after image resize (scale resize). For example: If you images is too large 2000x1000 and you need preserve aspect ratio - then you resize images withscaleResize
. Typycal task formerge
: place watermark over image.But you can not use both methods together:
Case A) reseze + merge:
Result: watermark on transparent background (INVISIBLE) depends on aspect ratio.
Case B) merge + resize:
Result: watermark is visible but too small (resized with image).
My solution (compare ratio before place):
So, now it is impossible place watermark on top/left/bottom of images?