QImage::byteCount -> QImage::sizeInByes

This commit is contained in:
Albert Astals Cid
2019-07-04 22:26:53 +02:00
parent bff22e2a76
commit 75ef81a109
3 changed files with 6 additions and 6 deletions

View File

@ -35,8 +35,8 @@ static void writeImageData(const char *name, const QString &filename, const QIma
{
QFile file(filename);
if (file.open(QIODevice::WriteOnly)) {
qint64 written = file.write(reinterpret_cast<const char *>(image.bits()), image.byteCount());
if (written == image.byteCount()) {
qint64 written = file.write(reinterpret_cast<const char *>(image.bits()), image.sizeInBytes());
if (written == image.sizeInBytes()) {
QTextStream(stdout) << " " << name
<< " written to " << filename << "\n";
} else {