5#include <private/qquickpixmap_p.h>
6#include <private/qimage_p.h>
20 QSize realSize = imgio.size();
31 imgio.setScaledSize(scSize);
34 if (imgio.read(&
image)) {
35 if (realSize.isEmpty())
36 realSize =
image.size();
41 if (
image.hasAlphaChannel() &&
image.data_ptr()->checkForAlphaPixels())
43 qCDebug(lcSharedImage) <<
"Convert on load from format" <<
image.format() <<
"to" << newFmt;
92 qCWarning(lcSharedImage) <<
"Sharing problem; loading" <<
id <<
"unshared";
108#include "moc_qsharedimageprovider_p.cpp"
static QDir root()
Returns the root directory.
The QImageReader class provides a format independent interface for reading images from files or other...
Format
The following image formats are available in Qt.
@ Format_ARGB32_Premultiplied
The QQuickImageProviderOptions class provides options for QQuickImageProviderWithOptions image reques...
bool preserveAspectRatioFit() const
Returns whether the image request is for a PreserveAspectFit Image.
bool preserveAspectRatioCrop() const
Returns whether the image request is for a PreserveAspectCrop Image.
static QSize loadSize(const QSize &originalSize, const QSize &requestedSize, const QByteArray &format, const QQuickImageProviderOptions &options, qreal devicePixelRatio=1.0)
Returns the recommended scaled image size for loading and storage.
The QQuickImageProvider class provides an interface for supporting pixmaps and threaded image request...
QImage load(const QString &path, ImageParameters *params=nullptr)
\macro QT_RESTRICTED_CAST_FROM_ASCII
QuickSharedImageLoader(QObject *parent=nullptr)
QString key(const QString &path, ImageParameters *params) override
QImage loadFile(const QString &path, ImageParameters *params) override
QScopedPointer< QuickSharedImageLoader > loader
QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize, const QQuickImageProviderOptions &options) override
Combined button and popup list for selecting options.
#define qCWarning(category,...)
#define qCDebug(category,...)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLsizei const GLchar *const * path
#define QStringLiteral(str)