![]() |
Murl Engine API
Version 2018.3
|
The video surface tools class. More...
#include <murl_util_video_surface_tools.h>
The video surface tools class.
The video surface tools can read and write several image formats from and to IVideoSurface objects.
Static Public Member Functions | |
static Bool | IsSupportedImage (const String &fileName) |
Check if a file has a supported image format. More... | |
static IEnums::ImageFormat | GetImageFormat (const String &fileName) |
Get the image format type of a file. More... | |
static String | GetFileExtension (IEnums::ImageFormat imageFormat) |
Get the typical file extension of a specified image format. More... | |
static IVideoSurface * | ReadImageFile (const String &fileName, IEnums::PixelFormat preferredPixelFormat) |
Read an image from a file and create a video surface. More... | |
static IVideoSurface * | ReadImageFile (const String &fileName, IImageDecoder::ImageInfo &imageInfo, IEnums::PixelFormat preferredPixelFormat) |
Read an image from a file, create a video surface and return the image format type. More... | |
static Bool | GetImageInfo (const ConstData &imageData, IImageDecoder::ImageInfo &imageInfo) |
Get the image information of an image from a data object. More... | |
static IVideoSurface * | ReadImage (const ConstData &imageData, IEnums::PixelFormat preferredPixelFormat) |
Read an image from a data object and create a video surface. More... | |
static IVideoSurface * | ReadImage (const ConstData &imageData, IImageDecoder::ImageInfo &imageInfo, IEnums::PixelFormat preferredPixelFormat) |
Read an image from a data object, create a video surface and return the image information. More... | |
static Bool | WritePngImageFile (const String &fileName, const IVideoSurface *source, IEnums::CompressionType compression) |
Write a video surface to a PNG encoded file. More... | |
static Bool | WriteWebpImageFile (const String &fileName, const IVideoSurface *source, IEnums::CompressionType compression, Real quality) |
Write a video surface to a WEBP encoded file. More... | |
static Bool | WriteJpgImageFile (const String &fileName, const IVideoSurface *source, Real quality) |
Write a video surface to a JPEG encoded file. More... | |
static Bool | WriteDdsImageFile (const String &fileName, const IVideoSurface *source) |
Write a video surface to a DDS file. More... | |
static IVideoSurface * | DecodeRawImage (const ConstData &source, UInt32 flags, IEnums::PixelFormat pixelFormat, UInt32 sizeX, UInt32 sizeY, UInt32 pitch) |
Create a video surface with explicit pixel format and dimensions, and decode raw data into it. More... | |
static Bool | IsPngImage (const ConstData &source) |
Check if a data object contains a PNG image. More... | |
static Bool | GetPngImageInfo (const ConstData &source, IImageDecoder::ImageInfo &info) |
Get the PNG image information. More... | |
static IVideoSurface * | DecodePngImage (const ConstData &source, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode a PNG image from given source data to a newly created video surface. More... | |
static IVideoSurface * | DecodePngImage (const IImageDecoder::ImageInfo &info, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode a PNG image from a given image info structure to a newly created video surface. More... | |
static Bool | IsJpgImage (const ConstData &source) |
Check if a data object contains a JPG image. More... | |
static Bool | GetJpgImageInfo (const ConstData &source, IImageDecoder::ImageInfo &info) |
Get the JPG image information. More... | |
static IVideoSurface * | DecodeJpgImage (const ConstData &source, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode a JPG image from given source data to a newly created video surface. More... | |
static IVideoSurface * | DecodeJpgImage (const IImageDecoder::ImageInfo &info, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode a JPG image from a given image info structure to a newly created video surface. More... | |
static Bool | IsWebpImage (const ConstData &source) |
Check if a data object contains a WEBP image. More... | |
static Bool | GetWebpImageInfo (const ConstData &source, IImageDecoder::ImageInfo &info) |
Get the WEBP image information. More... | |
static IVideoSurface * | DecodeWebpImage (const ConstData &source, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode a WEBP image from given source data to a newly created video surface. More... | |
static IVideoSurface * | DecodeWebpImage (const IImageDecoder::ImageInfo &info, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode a WEBP image from a given image info structure to a newly created video surface. More... | |
static Bool | IsDdsImage (const ConstData &source) |
Check if a data object contains a DDS image. More... | |
static Bool | GetDdsImageInfo (const ConstData &source, IImageDecoder::ImageInfo &info) |
Get the DDS image information. More... | |
static IVideoSurface * | DecodeDdsImage (const ConstData &source, UInt32 surfaceIndex=0, UInt32 mipLevel=0, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode a DDS image from given source data to a newly created video surface. More... | |
static IVideoSurface * | DecodeDdsImage (const IImageDecoder::ImageInfo &info, UInt32 surfaceIndex=0, UInt32 mipLevel=0, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode a DDS image from a given image info structure to a newly created video surface. More... | |
static Bool | IsKtxImage (const ConstData &source) |
Check if a data object contains a KTX image. More... | |
static Bool | GetKtxImageInfo (const ConstData &source, IImageDecoder::ImageInfo &info) |
Get the KTX image information. More... | |
static IVideoSurface * | DecodeKtxImage (const ConstData &source, UInt32 surfaceIndex=0, UInt32 mipLevel=0, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode a KTX image from given source data to a newly created video surface. More... | |
static IVideoSurface * | DecodeKtxImage (const IImageDecoder::ImageInfo &info, UInt32 surfaceIndex=0, UInt32 mipLevel=0, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode a KTX image from a given image info structure to a newly created video surface. More... | |
static Bool | IsPvrImage (const ConstData &source) |
Check if a data object contains a PVR image. More... | |
static Bool | GetPvrImageInfo (const ConstData &source, IImageDecoder::ImageInfo &info) |
Get the PVR image information. More... | |
static IVideoSurface * | DecodePvrImage (const ConstData &source, UInt32 surfaceIndex=0, UInt32 mipLevel=0, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode a PVR image from given source data to a newly created video surface. More... | |
static IVideoSurface * | DecodePvrImage (const IImageDecoder::ImageInfo &info, UInt32 surfaceIndex=0, UInt32 mipLevel=0, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode a PVR image from a given image info structure to a newly created video surface. More... | |
static Bool | IsPkmImage (const ConstData &source) |
Check if a data object contains a PKM image. More... | |
static Bool | GetPkmImageInfo (const ConstData &source, IImageDecoder::ImageInfo &info) |
Get the PKM image information. More... | |
static IVideoSurface * | DecodePkmImage (const ConstData &source, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode a PKM image from given source data to a newly created video surface. More... | |
static IVideoSurface * | DecodePkmImage (const IImageDecoder::ImageInfo &info, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode a PVR image from a given image info structure to a newly created video surface. More... | |
static Bool | IsAstcImage (const ConstData &source) |
Check if a data object contains an ASTC image. More... | |
static Bool | GetAstcImageInfo (const ConstData &source, IImageDecoder::ImageInfo &info) |
Get the ASTC image information. More... | |
static IVideoSurface * | DecodeAstcImage (const ConstData &source, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode an ASTC image from given source data to a newly created video surface. More... | |
static IVideoSurface * | DecodeAstcImage (const IImageDecoder::ImageInfo &info, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode a PVR image from a given image info structure to a newly created video surface. More... | |
static Bool | IsTgaImage (const ConstData &source) |
Check if a data object contains a TGA image. More... | |
static Bool | GetTgaImageInfo (const ConstData &source, IImageDecoder::ImageInfo &info) |
Get the TGA image information. More... | |
static IVideoSurface * | DecodeTgaImage (const ConstData &source, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode a TGA image from given source data to a newly created video surface. More... | |
static IVideoSurface * | DecodeTgaImage (const IImageDecoder::ImageInfo &info, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode a TGA image from a given image info structure to a newly created video surface. More... | |
static Bool | IsHdrImage (const ConstData &source) |
Check if a data object contains an HDR image. More... | |
static Bool | GetHdrImageInfo (const ConstData &source, IImageDecoder::ImageInfo &info) |
Get the HDR image information. More... | |
static IVideoSurface * | DecodeHdrImage (const ConstData &source, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode an HDR image from given source data to a newly created video surface. More... | |
static IVideoSurface * | DecodeHdrImage (const IImageDecoder::ImageInfo &info, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode an HDR image from a given image info structure to a newly created video surface. More... | |
static Bool | IsPfmImage (const ConstData &source) |
Check if a data object contains a PFM image. More... | |
static Bool | GetPfmImageInfo (const ConstData &source, IImageDecoder::ImageInfo &info) |
Get the PFM image information. More... | |
static IVideoSurface * | DecodePfmImage (const ConstData &source, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode a PFM image from given source data to a newly created video surface. More... | |
static IVideoSurface * | DecodePfmImage (const IImageDecoder::ImageInfo &info, UInt32 flags=0, IEnums::PixelFormat pixelFormat=IEnums::PIXEL_FORMAT_UNDEFINED) |
Decode a PFM image from a given image info structure to a newly created video surface. More... | |
static Bool | EncodeImage (IEnums::ImageFormat imageFormat, Data &destination, const IVideoSurface *source, IEnums::CompressionType compression, Real quality) |
Encode a video surface to a data object. More... | |
static Bool | EncodePngImage (Data &destination, const IVideoSurface *source, IEnums::CompressionType compression) |
Encode a video surface to a PNG data object. More... | |
static Bool | EncodeWebpImage (Data &destination, const IVideoSurface *source, IEnums::CompressionType compression, Real quality) |
Encode a video surface to a WEBP data object. More... | |
static Bool | EncodeJpgImage (Data &destination, const IVideoSurface *source, Real quality) |
Encode a video surface to a JPEG data object. More... | |
static Bool | EncodeDdsImage (Data &destination, const IVideoSurface *source) |
Encode a video surface to a DDS data object. More... | |
static Bool | EncodeRawImage (Data &destination, const IVideoSurface *source) |
Encode a video surface to a raw data object. More... | |
static Bool | EncodeImageAs (IEnums::ImageFormat imageFormat, Data &destination, const IVideoSurface *source, IEnums::PixelFormat pixelFormat, const SInt32 components[4], IEnums::CompressionType compression, Real quality) |
Encode a video surface to a data object, using an explicit image pixel format. More... | |
static Bool | EncodePngImageAs (Data &destination, const IVideoSurface *source, IEnums::PixelFormat pixelFormat, const SInt32 components[4], IEnums::CompressionType compression) |
Encode a video surface to a PNG data object, using an explicit image pixel format. More... | |
static Bool | EncodeWebpImageAs (Data &destination, const IVideoSurface *source, IEnums::PixelFormat pixelFormat, const SInt32 components[4], IEnums::CompressionType compression, Real quality) |
Encode a video surface to a WEBP data object, using an explicit image pixel format. More... | |
static Bool | EncodeJpgImageAs (Data &destination, const IVideoSurface *source, IEnums::PixelFormat pixelFormat, const SInt32 components[4], Real quality) |
Encode a video surface to a JPG data object, using an explicit image pixel format. More... | |
static Bool | GetPixelFormatToEncodeImage (IEnums::ImageFormat outputImageFormat, IEnums::PixelFormat outputPixelFormat, IEnums::PixelFormat &surfacePixelFormat, IEnums::PixelFormat &imagePixelFormat, SInt32 imageComponents[4]) |
For a given output image format and desired pixel format to encode, get the best matching pixel format an image of the given type can store, and get the pixel format needed for a surface to be correctly encoded. More... | |
static Bool | GetPixelFormatToEncodePngImage (IEnums::PixelFormat outputPixelFormat, IEnums::PixelFormat &surfacePixelFormat, IEnums::PixelFormat &imagePixelFormat, SInt32 imageComponents[4]) |
Get the best matching pixel formats to encode a PNG image. More... | |
static Bool | GetPixelFormatToEncodeWebpImage (IEnums::PixelFormat outputPixelFormat, IEnums::PixelFormat &surfacePixelFormat, IEnums::PixelFormat &imagePixelFormat, SInt32 imageComponents[4]) |
Get the best matching pixel formats to encode a WEBP image. More... | |
static Bool | GetPixelFormatToEncodeJpgImage (IEnums::PixelFormat outputPixelFormat, IEnums::PixelFormat &surfacePixelFormat, IEnums::PixelFormat &imagePixelFormat, SInt32 imageComponents[4]) |
Get the best matching pixel formats to encode a JPG image. More... | |
Check if a file has a supported image format.
fileName | The file name. |
|
static |
Get the image format type of a file.
fileName | The file name. |
|
static |
Get the typical file extension of a specified image format.
imageFormat | The image format type. |
|
static |
Read an image from a file and create a video surface.
fileName | The file name. |
preferredPixelFormat | The preferred pixel format. |
|
static |
Read an image from a file, create a video surface and return the image format type.
fileName | The file name. |
imageInfo | The image information return value. |
preferredPixelFormat | The preferred pixel format. |
|
static |
Get the image information of an image from a data object.
imageData | The data object containing the image. |
imageInfo | The image information return value. |
|
static |
Read an image from a data object and create a video surface.
imageData | The data object containing the image. |
preferredPixelFormat | The preferred pixel format. |
|
static |
Read an image from a data object, create a video surface and return the image information.
imageData | The data object containing the image. |
imageInfo | The image information return value. |
preferredPixelFormat | The preferred pixel format. |
|
static |
Write a video surface to a PNG encoded file.
fileName | The file name to write. |
source | The video surface to encode from. |
compression | The type of compression. Use the zlib best compression if COMPRESSION_TYPE_BEST, otherwise the png-lib default compression is used. |
|
static |
Write a video surface to a WEBP encoded file.
fileName | The file name to write. |
source | The video surface to encode from. |
compression | The type of compression. |
quality | The quality of compression in range [0 .. 100] where 0 is the lowest quality and the highest compression and 100 is the highest quality and the lowest compression. |
|
static |
Write a video surface to a JPEG encoded file.
fileName | The file name to write. |
source | The video surface to encode from. |
quality | The quality of compression in range [0 .. 100] where 0 is the lowest quality and the highest compression and 100 is the highest quality and the lowest compression. |
|
static |
Write a video surface to a DDS file.
fileName | The file name to write. |
source | The video surface to encode from. |
|
static |
Create a video surface with explicit pixel format and dimensions, and decode raw data into it.
Source data must contain enough bytes to hold the full surface of given width, height and pixel format, which can be calculated via IEnums::GetPixelFormatBytesPerSurface(). See IEnums::GetPixelFormatBytesPerLine() for details regarding the line pitch of an uncompressed pixel format. See also IEnums::GetPixelFormatCompressedBlockSizeX(), IEnums::GetPixelFormatCompressedBlockSizeY() and IEnums::GetPixelFormatCompressedBytesPerBlock() for details regarding compressed pixel formats.
source | The data object containing the raw data. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The pixel format represented by the given data. |
sizeX | The horizontal size of the image in pixels. |
sizeY | The vertical size of the image in pixels. |
pitch | The line pitch (bytes per line) of the given data. Ignored for compressed formats. |
Check if a data object contains a PNG image.
source | The data object containing the image. |
|
static |
Get the PNG image information.
source | The data object containing the image. |
info | The image information structure return value. |
|
static |
Decode a PNG image from given source data to a newly created video surface.
source | The data object containing the encoded PNG image. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
|
static |
Decode a PNG image from a given image info structure to a newly created video surface.
info | The image info structure. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
Check if a data object contains a JPG image.
source | The data object containing the image. |
|
static |
Get the JPG image information.
source | The data object containing the image. |
info | The image information structure return value. |
|
static |
Decode a JPG image from given source data to a newly created video surface.
source | The data object containing the encoded JPG image. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
|
static |
Decode a JPG image from a given image info structure to a newly created video surface.
info | The image info structure. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
Check if a data object contains a WEBP image.
source | The data object containing the image. |
|
static |
Get the WEBP image information.
source | The data object containing the image. |
info | The image information structure return value. |
|
static |
Decode a WEBP image from given source data to a newly created video surface.
source | The data object containing the encoded WEBP image. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
|
static |
Decode a WEBP image from a given image info structure to a newly created video surface.
info | The image info structure. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
Check if a data object contains a DDS image.
source | The data object containing the image. |
|
static |
Get the DDS image information.
source | The data object containing the image. |
info | The image information structure return value. |
|
static |
Decode a DDS image from given source data to a newly created video surface.
source | The data object containing the encoded DDS image. |
surfaceIndex | The zero-based index of the surface within the DDS image. For single-layer images, this must be 0 for 2D images or in the range [0..5] for cube maps. For array images, this must be in the range [0..N-1] for 2D images or [0..6*N-1] for cube maps, with N being the number of array layers present. |
mipLevel | The zero-based index into the surface's MIP chain. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
|
static |
Decode a DDS image from a given image info structure to a newly created video surface.
info | The image info structure. |
surfaceIndex | The zero-based index of the surface within the DDS image. For single-layer images, this must be 0 for 2D images or in the range [0..5] for cube maps. For array images, this must be in the range [0..N-1] for 2D images or [0..6*N-1] for cube maps, with N being the number of array layers present. |
mipLevel | The zero-based index into the surface's MIP chain. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
Check if a data object contains a KTX image.
source | The data object containing the image. |
|
static |
Get the KTX image information.
source | The data object containing the image. |
info | The image information structure return value. |
|
static |
Decode a KTX image from given source data to a newly created video surface.
source | The data object containing the encoded KTX image. |
surfaceIndex | The zero-based index of the surface within the KTX image. For single-layer images, this must be 0 for 2D images or in the range [0..5] for cube maps. For array images, this must be in the range [0..N-1] for 2D images or [0..6*N-1] for cube maps, with N being the number of array layers present. |
mipLevel | The zero-based index into the surface's MIP chain. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
|
static |
Decode a KTX image from a given image info structure to a newly created video surface.
info | The image info structure. |
surfaceIndex | The zero-based index of the surface within the KTX image. For single-layer images, this must be 0 for 2D images or in the range [0..5] for cube maps. For array images, this must be in the range [0..N-1] for 2D images or [0..6*N-1] for cube maps, with N being the number of array layers present. |
mipLevel | The zero-based index into the surface's MIP chain. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
Check if a data object contains a PVR image.
source | The data object containing the image. |
|
static |
Get the PVR image information.
source | The data object containing the image. |
info | The image information structure return value. |
|
static |
Decode a PVR image from given source data to a newly created video surface.
source | The data object containing the encoded PVR image. |
surfaceIndex | The zero-based index of the surface within the PVR image. For single-layer images, this must be 0 for 2D images or in the range [0..5] for cube maps. For array images, this must be in the range [0..N-1] for 2D images or [0..6*N-1] for cube maps, with N being the number of array layers present. |
mipLevel | The zero-based index into the surface's MIP chain. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
|
static |
Decode a PVR image from a given image info structure to a newly created video surface.
info | The image info structure. |
surfaceIndex | The zero-based index of the surface within the PVR image. For single-layer images, this must be 0 for 2D images or in the range [0..5] for cube maps. For array images, this must be in the range [0..N-1] for 2D images or [0..6*N-1] for cube maps, with N being the number of array layers present. |
mipLevel | The zero-based index into the surface's MIP chain. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
Check if a data object contains a PKM image.
source | The data object containing the image. |
|
static |
Get the PKM image information.
source | The data object containing the image. |
info | The image information structure return value. |
|
static |
Decode a PKM image from given source data to a newly created video surface.
source | The data object containing the encoded PKM image. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
|
static |
Decode a PVR image from a given image info structure to a newly created video surface.
info | The image info structure. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
Check if a data object contains an ASTC image.
source | The data object containing the image. |
|
static |
Get the ASTC image information.
source | The data object containing the image. |
info | The image information structure return value. |
|
static |
Decode an ASTC image from given source data to a newly created video surface.
source | The data object containing the encoded ASTC image. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
|
static |
Decode a PVR image from a given image info structure to a newly created video surface.
info | The image info structure. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
Check if a data object contains a TGA image.
source | The data object containing the image. |
|
static |
Get the TGA image information.
source | The data object containing the image. |
info | The image information structure return value. |
|
static |
Decode a TGA image from given source data to a newly created video surface.
source | The data object containing the encoded TGA image. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
|
static |
Decode a TGA image from a given image info structure to a newly created video surface.
info | The image info structure. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
Check if a data object contains an HDR image.
source | The data object containing the image. |
|
static |
Get the HDR image information.
source | The data object containing the image. |
info | The image information structure return value. |
|
static |
Decode an HDR image from given source data to a newly created video surface.
source | The data object containing the encoded HDR image. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
|
static |
Decode an HDR image from a given image info structure to a newly created video surface.
info | The image info structure. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
Check if a data object contains a PFM image.
source | The data object containing the image. |
|
static |
Get the PFM image information.
source | The data object containing the image. |
info | The image information structure return value. |
|
static |
Decode a PFM image from given source data to a newly created video surface.
source | The data object containing the encoded PFM image. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
|
static |
Decode a PFM image from a given image info structure to a newly created video surface.
info | The image info structure. |
flags | A bitfield of decoder flags from the DecoderFlag enumeration. |
pixelFormat | The desired output pixel format. |
|
static |
Encode a video surface to a data object.
imageFormat | The image format to encode. |
destination | The data object to write into. |
source | The video surface to encode from. |
compression | The type of compression. |
quality | The quality of compression in range [0 .. 100] where 0 represents lowest quality and highest compression and 100 represents highest quality and lowest compression. |
|
static |
Encode a video surface to a PNG data object.
destination | The data object to write into. |
source | The video surface to encode from. |
compression | The type of compression. Use the zlib best compression if COMPRESSION_TYPE_BEST, otherwise the png-lib default compression is used. |
|
static |
Encode a video surface to a WEBP data object.
destination | The data object to write into. |
source | The video surface to encode from. |
compression | The type of compression. |
quality | The quality of compression in range [0 .. 100] where 0 is the lowest quality and the highest compression and 100 is the highest quality and the lowest compression. |
|
static |
Encode a video surface to a JPEG data object.
destination | The data object to write into. |
source | The video surface to encode from. |
quality | The quality of compression in range [0 .. 100] where 0 is the lowest quality and the highest compression and 100 is the highest quality and the lowest compression. |
|
static |
Encode a video surface to a DDS data object.
destination | The data object to write into. |
source | The video surface to encode from. |
|
static |
Encode a video surface to a raw data object.
destination | The data object to write into. |
source | The video surface to encode from. |
|
static |
Encode a video surface to a data object, using an explicit image pixel format.
This method tries to encode a given surface as an image of a given type, possibly shuffling the source surface's color components so that they can be stored in one of the image format's actually supported storage pixel format. Use GetPixelFormatToEncodeImage() to query necessary values for a given pixel format. The given surface must match the surfacePixelFormat retrieved from that method.
imageFormat | The image format to encode. |
destination | The data object to write into. |
source | The video surface to encode from. |
pixelFormat | The actual image pixel format, retrieved from GetPixelFormatToEncodeImage(). |
components | The color component indices, retrieved from GetPixelFormatToEncodeImage(). |
compression | The type of compression. |
quality | The quality of compression in range [0 .. 100] where 0 represents lowest quality and highest compression and 100 represents highest quality and lowest compression. |
|
static |
Encode a video surface to a PNG data object, using an explicit image pixel format.
See EncodeImageAs().
destination | The data object to write into. |
source | The video surface to encode from. |
pixelFormat | The actual image pixel format, retrieved from GetPixelFormatToEncodePngImage(). |
components | The color component indices, retrieved from GetPixelFormatToEncodePngImage(). |
compression | The type of compression. |
|
static |
Encode a video surface to a WEBP data object, using an explicit image pixel format.
See EncodeImageAs().
destination | The data object to write into. |
source | The video surface to encode from. |
pixelFormat | The actual image pixel format, retrieved from GetPixelFormatToEncodeWebpImage(). |
components | The color component indices, retrieved from GetPixelFormatToEncodeWebpImage(). |
compression | The type of compression. |
quality | The quality of compression. |
|
static |
Encode a video surface to a JPG data object, using an explicit image pixel format.
See EncodeImageAs().
destination | The data object to write into. |
source | The video surface to encode from. |
pixelFormat | The actual image pixel format, retrieved from GetPixelFormatToEncodeJpgImage(). |
components | The color component indices, retrieved from GetPixelFormatToEncodeJpgImage(). |
quality | The quality of compression. |
|
static |
For a given output image format and desired pixel format to encode, get the best matching pixel format an image of the given type can store, and get the pixel format needed for a surface to be correctly encoded.
outputImageFormat | The image format for which to query the formats. |
outputPixelFormat | The desired pixel format of the color values to encode. |
surfacePixelFormat | A reference receiving the pixel format needed to create a surface to be encoded. |
imagePixelFormat | The actual pixel format to encode. |
imageComponents | An array of 4 integers receiving the component indices into the surface that are encoded. |
|
static |
Get the best matching pixel formats to encode a PNG image.
See GetPixelFormatToEncodeImage().
outputPixelFormat | The desired pixel format of the color values to encode. |
surfacePixelFormat | A reference receiving the pixel format needed to create a surface to be encoded. |
imagePixelFormat | The actual pixel format to encode. |
imageComponents | An array of 4 integers receiving the component indices into the surface that are encoded. |
|
static |
Get the best matching pixel formats to encode a WEBP image.
See GetPixelFormatToEncodeImage().
outputPixelFormat | The desired pixel format of the color values to encode. |
surfacePixelFormat | A reference receiving the pixel format needed to create a surface to be encoded. |
imagePixelFormat | The actual pixel format to encode. |
imageComponents | An array of 4 integers receiving the component indices into the surface that are encoded. |
|
static |
Get the best matching pixel formats to encode a JPG image.
See GetPixelFormatToEncodeImage().
outputPixelFormat | The desired pixel format of the color values to encode. |
surfacePixelFormat | A reference receiving the pixel format needed to create a surface to be encoded. |
imagePixelFormat | The actual pixel format to encode. |
imageComponents | An array of 4 integers receiving the component indices into the surface that are encoded. |