Repository navigation
Image: added copyMergeAlpha(). - #90
radekdostal wants to merge 1 commit into
Conversation
|
馃憥 Too much code for too narrow use-case. |
|
In that case maybe this method should replace the original place method. |
|
The dark side of this method is its slowness, because iterating through all pixels. I think, that it has specific use only for images with transparency, so replace the place() method is not a good idea. |
|
In that case can you try finding out if the place method can be fixed (without pixel iteration)? I mean there should be same cases of this on the internet. |
|
I was unable to find a solution without pixel iteration. Moreover, the method signature is not compatible with place() method, because it allows to use even a fragment of the picture. |
|
It is a PHP bug. There is an opened pull request with the same algorithm as I took. So I think that only solution is algorithm with pixel iteration. |
|
This implementation is extreme slow, method has unclear name and a lot of parameters, gives a very different results for opacity = 0 and opacity = 1 and has swapped what is source and what is destination image. |
46f5434 to
ecbbdfc
Compare

Merge two true colour images with variable opacity while maintaining alpha transparency of both images.