arsd.image

This file imports all available image decoders in the arsd library, and provides convenient functions to load image regardless of it's format. Main functions: loadImageFromFile and loadImageFromMemory.

More...

Public Imports

arsd.color
public import arsd.color;
Undocumented in source.
arsd.png
public import arsd.png;
Undocumented in source.
arsd.jpeg
public import arsd.jpeg;
Undocumented in source.
arsd.bmp
public import arsd.bmp;
Undocumented in source.
arsd.targa
public import arsd.targa;
Undocumented in source.
arsd.pcx
public import arsd.pcx;
Undocumented in source.
arsd.dds
public import arsd.dds;
Undocumented in source.
arsd.svg
public import arsd.svg;
Undocumented in source.
arsd.imageresize
public import arsd.imageresize;
Undocumented in source.

Members

Enums

ImageFileFormat
enum ImageFileFormat

Image formats arsd.image can load (except Unknown, of course).

Functions

guessImageFormatFromExtension
ImageFileFormat guessImageFormatFromExtension(const(char)[] filename)

Try to guess image format from file extension.

guessImageFormatFromMemory
ImageFileFormat guessImageFormatFromMemory(const(void)[] membuf)

Try to guess image format by first data bytes.

loadImageFromFile
MemoryImage loadImageFromFile(T filename)

Try to guess image format from file name and load that image.

loadImageFromMemory
MemoryImage loadImageFromMemory(const(void)[] membuf)

Try to guess image format from data and load that image.

Detailed Description

This module is exempt from my usual build-compatibility guarantees. I may add new built-time dependency modules to it at any time without notice.

You should either copy the image.d module and the pieces you use to your own project, or always use it along with the rest of the repo and dmd -i, or the dub arsd-official:image_files subpackage, which both will include new files automatically and avoid breaking your build.

Meta

History

The image resize code used to live directly in here, but has now moved to a new module, arsd.imageresize. It is public imported here for compatibility, but the build has changed as of December 25, 2020.