Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qppmhandler.cpp File Reference

(975b3d5d530b647ba665459bef2fb3ee6ab5ccc1)

#include "private/qppmhandler_p.h"
#include <qdebug.h>
#include <qimage.h>
#include <qlist.h>
#include <qloggingcategory.h>
#include <qrgba64.h>
#include <qvariant.h>
#include <private/qlocale_p.h>
#include <private/qtools_p.h>
+ Include dependency graph for qppmhandler.cpp:

Go to the source code of this file.

Functions

static QT_BEGIN_NAMESPACE void discard_pbm_line (QIODevice *d)
 
static int read_pbm_int (QIODevice *d, bool *ok, int maxDigits=-1)
 
static bool read_pbm_header (QIODevice *device, char &type, int &w, int &h, int &mcc)
 
static QRgb scale_pbm_color (quint16 mx, quint16 rv, quint16 gv, quint16 bv)
 
static bool read_pbm_body (QIODevice *device, char type, int w, int h, int mcc, QImage *outImage)
 
static bool write_pbm_image (QIODevice *out, const QImage &sourceImage, QByteArrayView sourceFormat)
 

Function Documentation

◆ discard_pbm_line()

static QT_BEGIN_NAMESPACE void discard_pbm_line ( QIODevice * d)
static

Definition at line 25 of file qppmhandler.cpp.

References d.

Referenced by read_pbm_int().

+ Here is the caller graph for this function:

◆ read_pbm_body()

static bool read_pbm_body ( QIODevice * device,
char type,
int w,
int h,
int mcc,
QImage * outImage )
static

Definition at line 111 of file qppmhandler.cpp.

References QImageIOHandler::allocateImage(), device, QImage::Format_Grayscale8, QImage::Format_Mono, QImage::Format_RGB32, QRgba64::fromRgba64(), i, ok, QRgb, qRgb(), read_pbm_int(), and scale_pbm_color().

Referenced by QPpmHandler::read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read_pbm_header()

static bool read_pbm_header ( QIODevice * device,
char & type,
int & w,
int & h,
int & mcc )
static

Definition at line 78 of file qppmhandler.cpp.

References ascii_isspace(), device, QtMiscUtils::isAsciiDigit(), ok, and read_pbm_int().

+ Here is the call graph for this function:

◆ read_pbm_int()

static int read_pbm_int ( QIODevice * d,
bool * ok,
int maxDigits = -1 )
static

Definition at line 35 of file qppmhandler.cpp.

References ascii_isspace(), d, discard_pbm_line(), QtMiscUtils::isAsciiDigit(), and ok.

Referenced by read_pbm_body(), and read_pbm_header().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scale_pbm_color()

static QRgb scale_pbm_color ( quint16 mx,
quint16 rv,
quint16 gv,
quint16 bv )
inlinestatic

Definition at line 106 of file qppmhandler.cpp.

References QRgba64::fromRgba64().

Referenced by read_pbm_body().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ write_pbm_image()

static bool write_pbm_image ( QIODevice * out,
const QImage & sourceImage,
QByteArrayView sourceFormat )
static

Definition at line 272 of file qppmhandler.cpp.

References QString::append(), QImage::Format_ARGB32, QImage::Format_Grayscale8, QImage::Format_Indexed8, QImage::Format_Mono, QImage::Format_MonoLSB, QImage::Format_RGB32, QString::insert(), QByteArrayView::left(), line, QByteArray::number(), out, qBlue(), qGray(), qGreen(), qRed(), QRgb, rgb, QString::size(), and str.

Referenced by QPpmHandler::write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: