Gin
Loading...
Searching...
No Matches
TGAImageFormat Class Reference

Support for reading and writing Truevision TGA files. More...

#include <gin_tgaimageformat.h>

Inherits juce::ImageFileFormat.

Public Member Functions

juce::String getFormatName () override
bool canUnderstand (juce::InputStream &input) override
bool usesFileExtension (const juce::File &possibleFile) override
juce::Image decodeImage (juce::InputStream &input) override
bool writeImageToStream (const juce::Image &sourceImage, juce::OutputStream &destStream) override

Detailed Description

Support for reading and writing Truevision TGA files.

Reads colour mapped, true colour and greyscale images, each either uncompressed or run length encoded, at 8, 15, 16, 24 or 32 bits per pixel, with the rows and columns running whichever way the image descriptor says.

Always writes 32 bit uncompressed true colour images.

A TGA has no magic number at the front, so canUnderstand() looks for the file footer that version 2 of the format puts at the end, and failing that satisfies itself that the header makes sense. Give it a stream it can seek.

Member Function Documentation

◆ getFormatName()

juce::String TGAImageFormat::getFormatName ( )
override

◆ canUnderstand()

bool TGAImageFormat::canUnderstand ( juce::InputStream & input)
override

◆ usesFileExtension()

bool TGAImageFormat::usesFileExtension ( const juce::File & possibleFile)
override

◆ decodeImage()

juce::Image TGAImageFormat::decodeImage ( juce::InputStream & input)
override

◆ writeImageToStream()

bool TGAImageFormat::writeImageToStream ( const juce::Image & sourceImage,
juce::OutputStream & destStream )
override

The documentation for this class was generated from the following file: