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// Qt-Security score:significant reason:default
4
5
6#ifndef QIIOFHELPERS_P_H
7#define QIIOFHELPERS_P_H
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists for the convenience
14// of other Qt classes. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20#include <QImageIOPlugin>
21#include <private/qcore_mac_p.h>
22#include <ImageIO/ImageIO.h>
23#include <QList>
24
25QT_BEGIN_NAMESPACE
26
27namespace NS_IIOF_HELPERS {
28
29/*
30Functions to utilize the native ImageIO Framework in OS X and iOS
31*/
32
34{
35public:
36 static QImageIOPlugin::Capabilities systemCapabilities(const QString &uti);
37 static bool readImage(QImageIOHandler *q_ptr, QImage *out);
38 static bool writeImage(QImageIOHandler *q_ptr, const QImage &in, const QString &uti);
39};
40
42{
43public:
44 QIIOFHelper(QImageIOHandler *q);
45
46 bool readImage(QImage *out);
47 bool writeImage(const QImage &in, const QString &uti);
48 QVariant imageProperty(QImageIOHandler::ImageOption option);
49 void setOption(QImageIOHandler::ImageOption option, const QVariant &value);
50
51protected:
52 bool initRead();
53 bool getIntProperty(CFStringRef property, int *value);
54
60};
61
62}
63
64QT_END_NAMESPACE
65
66#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:43
Combined button and popup list for selecting options.