Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qiiofhelpers_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QIIOFHELPERS_P_H
5#define QIIOFHELPERS_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of other Qt classes. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QImageIOPlugin>
19#include <private/qcore_mac_p.h>
20#include <ImageIO/ImageIO.h>
21#include <QList>
22
23QT_BEGIN_NAMESPACE
24
25namespace NS_IIOF_HELPERS {
26
27/*
28Functions to utilize the native ImageIO Framework in OS X and iOS
29*/
30
32{
33public:
34 static QImageIOPlugin::Capabilities systemCapabilities(const QString &uti);
35 static bool readImage(QImageIOHandler *q_ptr, QImage *out);
36 static bool writeImage(QImageIOHandler *q_ptr, const QImage &in, const QString &uti);
37};
38
40{
41public:
42 QIIOFHelper(QImageIOHandler *q);
43
44 bool readImage(QImage *out);
45 bool writeImage(const QImage &in, const QString &uti);
46 QVariant imageProperty(QImageIOHandler::ImageOption option);
47 void setOption(QImageIOHandler::ImageOption option, const QVariant &value);
48
49protected:
50 bool initRead();
51 bool getIntProperty(CFStringRef property, int *value);
52
58};
59
60}
61
62QT_END_NAMESPACE
63
64#endif
QList< QVariant > writeOptions
QCFType< CGImageSourceRef > cgImageSource
QIIOFHelper(QImageIOHandler *q)
QCFType< CGDataProviderRef > cgDataProvider
bool getIntProperty(CFStringRef property, int *value)
QVariant imageProperty(QImageIOHandler::ImageOption option)
QCFType< CFDictionaryRef > cfImageDict
static QImageIOPlugin::Capabilities systemCapabilities(const QString &uti)
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.
QImageIOHandler * create(QIODevice *device, const QByteArray &format=QByteArray()) const override
Creates and returns a QImageIOHandler subclass, with device and format set.
Definition main.cpp:41
Combined button and popup list for selecting options.