ppmformats

Minimalistic library for working with Netpbm image formats. Currently, work with formats from P1 to P6 is supported. An overview of the internal structure of the library, its interfaces and applications is available at the link (in Russian): https://lhs-blog.info/programming/dlang/ppmformats-library/

Members

Classes

P1Image
class P1Image

A class that provides the ability to work with color images in P1 format. NB: The format is raw text.

P2Image
class P2Image

A class that provides the ability to work with color images in P2 format. NB: The format is raw text.

P3Image
class P3Image

A class that provides the ability to work with color images in P3 format. NB: The format is raw text.

P4Image
class P4Image

A class that provides the ability to work with color images in P4 format. NB: The format is raw binary.

P5Image
class P5Image

A class that provides the ability to work with color images in P5 format. NB: The format is raw binary.

P6Image
class P6Image

A class that provides the ability to work with color images in P6 format. NB: The format is raw binary.

PFImage
class PFImage

A class that provides the ability to work with color images in PF (portable floatmpa image) format. NB: The format is raw binary. Support of this format is EXPERIMENTAL (!!!).

PixMapFile
class PixMapFile

Common ancestor for all subsequent image types. Implements a generic way to load/save images by providing generic load/save methods. Also, inheritance from this class allows descendant classes to have methods for working with images: indexing, assigning values ​​to pixels and accessing them without the need to create an object of the PixMapImage class to manipulate images.

PixMapImage
class PixMapImage

A class that provides a convenient interface for working with images. Represents a one-dimensional array.

RGBColor
class RGBColor

Class for representing color in RGB format.

Enums

BYTE_ORDER
enum BYTE_ORDER

Endianess (i.e byte-order)

PixMapFormat
enum PixMapFormat

All possible types of Portable Anymap Image formats in the form of a convenient division into binary and text image formats.

Functions

image
PixMapFile image(size_t width, size_t height, PixMapFormat pmFormat)

A constructor function that creates an image with the given length, width, and format. By default, all parameters are 0, and the format is represented by the PixMapFormat.PPM_BINARY value, which corresponds to an image with a P6 format.

image
PixMapFile image(size_t width, size_t height, string pmFormat)

A constructor function that creates an image with the given length, width, and format. By default, all parameters are 0, and the format is represented by the "P6" value, which corresponds to an image with a P6 format.

Meta

Authors

Oleg Bakharev, Ilya Pertsev