Copy image offset in copyMetadata
Making it be carried more consistently. Pick-to: 6.7 Change-Id: I8d2da1264a59febbd44bbcff798b647ec2813bb0 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This commit is contained in:
parent
3973d6c529
commit
2d2fae4863
@ -1172,9 +1172,10 @@ static void copyPhysicalMetadata(QImageData *dst, const QImageData *src)
|
|||||||
|
|
||||||
static void copyMetadata(QImageData *dst, const QImageData *src)
|
static void copyMetadata(QImageData *dst, const QImageData *src)
|
||||||
{
|
{
|
||||||
// Doesn't copy colortable and alpha_clut, or offset.
|
// Doesn't copy colortable and alpha_clut.
|
||||||
copyPhysicalMetadata(dst, src);
|
copyPhysicalMetadata(dst, src);
|
||||||
dst->text = src->text;
|
dst->text = src->text;
|
||||||
|
dst->offset = src->offset;
|
||||||
dst->colorSpace = src->colorSpace;
|
dst->colorSpace = src->colorSpace;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1239,7 +1240,6 @@ QImage Q_TRACE_INSTRUMENT(qtgui) QImage::copy(const QRect& r) const
|
|||||||
} else
|
} else
|
||||||
memcpy(image.bits(), bits(), d->nbytes);
|
memcpy(image.bits(), bits(), d->nbytes);
|
||||||
image.d->colortable = d->colortable;
|
image.d->colortable = d->colortable;
|
||||||
image.d->offset = d->offset;
|
|
||||||
image.d->has_alpha_clut = d->has_alpha_clut;
|
image.d->has_alpha_clut = d->has_alpha_clut;
|
||||||
copyMetadata(image.d, d);
|
copyMetadata(image.d, d);
|
||||||
return image;
|
return image;
|
||||||
@ -1328,7 +1328,6 @@ QImage Q_TRACE_INSTRUMENT(qtgui) QImage::copy(const QRect& r) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
copyMetadata(image.d, d);
|
copyMetadata(image.d, d);
|
||||||
image.d->offset = offset();
|
|
||||||
image.d->has_alpha_clut = d->has_alpha_clut;
|
image.d->has_alpha_clut = d->has_alpha_clut;
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
@ -2228,7 +2227,6 @@ QImage QImage::convertToFormat_helper(Format format, Qt::ImageConversionFlags fl
|
|||||||
|
|
||||||
QIMAGE_SANITYCHECK_MEMORY(image);
|
QIMAGE_SANITYCHECK_MEMORY(image);
|
||||||
|
|
||||||
image.d->offset = offset();
|
|
||||||
copyMetadata(image.d, d);
|
copyMetadata(image.d, d);
|
||||||
|
|
||||||
converter(image.d, d, flags);
|
converter(image.d, d, flags);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user