PoDoFo 0.9.20
|
Classes | |
class | FormatHelper |
class | RecursionGuard |
Enumerations | |
enum class | XMPListType { LangAlt , Seq , Bag } |
Functions | |
void | FetchImageRGB (PoDoFo::OutputStream &stream, unsigned width, unsigned heigth, PoDoFo::PdfPixelFormat format, const unsigned char *imageData, const PoDoFo::charbuff &smaskData, PoDoFo::charbuff &scanLine) |
void | FetchImageGrayScale (PoDoFo::OutputStream &stream, unsigned width, unsigned heigth, PoDoFo::PdfPixelFormat format, const unsigned char *imageData, const PoDoFo::charbuff &smaskData, PoDoFo::charbuff &scanLine) |
void | FetchImageBW (PoDoFo::OutputStream &stream, unsigned width, unsigned heigth, PoDoFo::PdfPixelFormat format, fxcodec::ScanlineDecoder &decoder, const PoDoFo::charbuff &smaskData, PoDoFo::charbuff &scanLine) |
bool | DoesMultiplicationOverflow (size_t op1, size_t op2) |
const char * | TypeNameForIndex (unsigned index, const char **types, unsigned len) |
int | TypeNameToIndex (const char *type, const char **types, unsigned len, int unknownValue) |
size_t | ReadBuffer (std::istream &stream, char *buffer, size_t size, bool &eof) |
bool | ReadChar (std::istream &stream, char &ch) |
SPDX-FileCopyrightText: (C) 2022 Francesco Pretto ceztk.nosp@m.o@gm.nosp@m.ail.c.nosp@m.om SPDX-License-Identifier: LGPL-2.0-or-later SPDX-License-Identifier: MPL-2.0
Namespace for private utilities and common functions
|
strong |
bool utls::DoesMultiplicationOverflow | ( | size_t | op1, |
size_t | op2 ) |
Check if multiplying two numbers will overflow. This is crucial when calculating buffer sizes that are the product of two numbers/
void utls::FetchImageBW | ( | PoDoFo::OutputStream & | stream, |
unsigned | width, | ||
unsigned | heigth, | ||
PoDoFo::PdfPixelFormat | format, | ||
fxcodec::ScanlineDecoder & | decoder, | ||
const PoDoFo::charbuff & | smaskData, | ||
PoDoFo::charbuff & | scanLine ) |
Fetch a black and white image and write it to the stream
void utls::FetchImageGrayScale | ( | PoDoFo::OutputStream & | stream, |
unsigned | width, | ||
unsigned | heigth, | ||
PoDoFo::PdfPixelFormat | format, | ||
const unsigned char * | imageData, | ||
const PoDoFo::charbuff & | smaskData, | ||
PoDoFo::charbuff & | scanLine ) |
Fetch a GrayScale image and write it to the stream
void utls::FetchImageRGB | ( | PoDoFo::OutputStream & | stream, |
unsigned | width, | ||
unsigned | heigth, | ||
PoDoFo::PdfPixelFormat | format, | ||
const unsigned char * | imageData, | ||
const PoDoFo::charbuff & | smaskData, | ||
PoDoFo::charbuff & | scanLine ) |
Fetch a RGB image and write it to the stream
size_t utls::ReadBuffer | ( | std::istream & | stream, |
char * | buffer, | ||
size_t | size, | ||
bool & | eof ) |
eof | true if the stream reached EOF during read |
bool utls::ReadChar | ( | std::istream & | stream, |
char & | ch ) |
const char * utls::TypeNameForIndex | ( | unsigned | index, |
const char ** | types, | ||
unsigned | len ) |
Convert an enum or index to its string representation which can be written to the PDF file.
This is a helper function for various classes that need strings and enums for their SubTypes keys.
index | the index or enum value |
types | an array of strings containing the string mapping of the index |
len | the length of the string array |
int utls::TypeNameToIndex | ( | const char * | type, |
const char ** | types, | ||
unsigned | len, | ||
int | unknownValue ) |
Convert a string type to an array index or enum.
This is a helper function for various classes that need strings and enums for their SubTypes keys.
type | the type as string |
types | an array of strings containing the string mapping of the index |
len | the length of the string array |
unknownValue | the value that is returned when the type is unknown |