10QMacHeifHandler::QMacHeifHandler()
11 : d(
new QIIOFHelper(
this))
21 bool bCanRead =
false;
23 if (iod && iod->peek(buf, 12) == 12) {
24 bCanRead = (!qstrncmp(buf + 4,
"ftyp", 4) &&
25 (!qstrncmp(buf + 8,
"heic", 4) ||
26 !qstrncmp(buf + 8,
"heix", 4) ||
27 !qstrncmp(buf + 8,
"msf1", 4) ||
28 !qstrncmp(buf + 8,
"mif1", 4)));
35 if (canRead(device())) {
44 return d->readImage(image);
49 return d->writeImage(image, QStringLiteral(
"public.heic"));
54 return d->imageProperty(option);
59 d->setOption(option, value);
64 return option == Quality
66 || option == ImageTransformation;
bool read(QImage *image) override
Read an image from the device, and stores it in image.
static bool canRead(QIODevice *iod)
QVariant option(ImageOption option) const override
Returns the value assigned to option as a QVariant.
bool canRead() const override
Returns true if an image can be read from the device (i.e., the image format is supported,...
~QMacHeifHandler() override
bool supportsOption(ImageOption option) const override
Returns true if the QImageIOHandler supports the option option; otherwise returns false.
bool write(const QImage &image) override
Writes the image image to the assigned device.
void setOption(ImageOption option, const QVariant &value) override
Sets the option option with the value value.