image.copyPixels fixes
This commit is contained in:
@@ -131,7 +131,7 @@ namespace lime {
|
||||
int destBytesPerPixel = image->buffer->bitsPerPixel / 8;
|
||||
|
||||
bool useAlphaImage = (alphaImage && alphaImage->buffer->transparent);
|
||||
bool blend = (mergeAlpha || (useAlphaImage && !image->buffer->transparent));
|
||||
bool blend = (mergeAlpha || (useAlphaImage && !image->buffer->transparent) || (!mergeAlpha && !image->buffer->transparent && sourceImage->buffer->transparent));
|
||||
|
||||
if (!useAlphaImage) {
|
||||
|
||||
|
||||
@@ -337,7 +337,7 @@ class ImageDataUtil
|
||||
var destBytesPerPixel = Std.int(image.buffer.bitsPerPixel / 8);
|
||||
|
||||
var useAlphaImage = (alphaImage != null && alphaImage.transparent);
|
||||
var blend = (mergeAlpha || (useAlphaImage && !image.transparent));
|
||||
var blend = (mergeAlpha || (useAlphaImage && !image.transparent)) || (!mergeAlpha && !image.transparent && sourceImage.transparent);
|
||||
|
||||
if (!useAlphaImage)
|
||||
{
|
||||
|
||||
@@ -448,6 +448,12 @@ class Image
|
||||
sourceImage = clone();
|
||||
}
|
||||
|
||||
if (alphaImage == sourceImage && (alphaPoint == null || (alphaPoint.x == 0 && alphaPoint.y == 0)))
|
||||
{
|
||||
alphaImage = null;
|
||||
alphaPoint = null;
|
||||
}
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case CANVAS:
|
||||
|
||||
Reference in New Issue
Block a user