openshot-audio  0.1.6
Public Member Functions | List of all members
juce::GIFImageFormat Class Reference

#include <juce_graphics.h>

Inheritance diagram for juce::GIFImageFormat:
juce::ImageFileFormat

Public Member Functions

 GIFImageFormat ()
 
 ~GIFImageFormat ()
 
String getFormatName () override
 
bool usesFileExtension (const File &) override
 
bool canUnderstand (InputStream &) override
 
Image decodeImage (InputStream &) override
 
bool writeImageToStream (const Image &, OutputStream &) override
 
- Public Member Functions inherited from juce::ImageFileFormat
virtual ~ImageFileFormat ()
 

Additional Inherited Members

- Static Public Member Functions inherited from juce::ImageFileFormat
static ImageFileFormatfindImageFormatForStream (InputStream &input)
 
static ImageFileFormatfindImageFormatForFileExtension (const File &file)
 
static Image loadFrom (InputStream &input)
 
static Image loadFrom (const File &file)
 
static Image loadFrom (const void *rawData, size_t numBytesOfData)
 
- Protected Member Functions inherited from juce::ImageFileFormat
 ImageFileFormat ()
 

Detailed Description

A subclass of ImageFileFormat for reading GIF files.

See also
ImageFileFormat, PNGImageFormat, JPEGImageFormat

Constructor & Destructor Documentation

◆ GIFImageFormat()

GIFImageFormat::GIFImageFormat ( )

◆ ~GIFImageFormat()

GIFImageFormat::~GIFImageFormat ( )

Member Function Documentation

◆ canUnderstand()

bool GIFImageFormat::canUnderstand ( InputStream input)
overridevirtual

Returns true if the given stream seems to contain data that this format understands.

The format class should only read the first few bytes of the stream and sniff for header bytes that it understands.

Note that this will advance the stream and leave it in a new position, so if you're planning on re-using it, you may want to rewind it after calling this method.

See also
decodeImage

Implements juce::ImageFileFormat.

◆ decodeImage()

Image GIFImageFormat::decodeImage ( InputStream input)
overridevirtual

Tries to decode and return an image from the given stream.

This will be called for an image format after calling its canUnderStand() method to see if it can handle the stream.

Parameters
inputthe stream to read the data from. The stream will be positioned at the start of the image data (but this may not necessarily be position 0)
Returns
the image that was decoded, or an invalid image if it fails.
See also
loadFrom

Implements juce::ImageFileFormat.

◆ getFormatName()

String GIFImageFormat::getFormatName ( )
overridevirtual

Returns a description of this file format.

E.g. "JPEG", "PNG"

Implements juce::ImageFileFormat.

◆ usesFileExtension()

bool GIFImageFormat::usesFileExtension ( const File possibleFile)
overridevirtual

Returns true if this format uses the file extension of the given file.

Implements juce::ImageFileFormat.

◆ writeImageToStream()

bool GIFImageFormat::writeImageToStream ( const Image sourceImage,
OutputStream destStream 
)
overridevirtual

Attempts to write an image to a stream.

To specify extra information like encoding quality, there will be appropriate parameters in the subclasses of the specific file types.

Returns
true if it nothing went wrong.

Implements juce::ImageFileFormat.


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