Class: TGIFConverter

Declaration: GIF.h


Class: TGIFConverter::TGIFConverterException

Declaration: GIF.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

Reports exceptional conditions encountered while converting GIF data streams into images.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Member Function: TGIFConverterException::GetErrorCode

ErrorCode GetErrorCode () const

Interface Category:

API.

Purpose:

Returns the error code that gives some indication of why the exception was thrown.

Calling Context:

Called from catch blocks.

Parameters:

Return Value:

The error code that caused the exception to be thrown.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGIFConverterException::operator<<=

virtual
TStream & operator <<= (TStream & fromStream)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGIFConverterException::operator>>=

virtual
TStream & operator >>=(TStream & toStream) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGIFConverterException::Throw

virtual void Throw () const

Interface Category:

API.

Purpose:

Throw the given exception

Calling Context:

This function is called by the GIFConverter.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGIFConverterException::~TGIFConverterException

virtual ~ TGIFConverterException ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGIFConverterException::TGIFConverterException

  1. TGIFConverterException (ErrorCode)
  2. TGIFConverterException (const TGIFConverterException &)
  3. TGIFConverterException ()

Interface Category:

API.

Purpose:

  1. Create an exception with the given ErrorCode.
  2. Copy constructor.
  3. Default constructor.

Calling Context:

  1. Called by the GIFConverter Class
  2. Called to copy an object.
  3. Called by the stream-in operators and directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Class: TGIFConverter

Declaration: GIF.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

Converts from a GIF87a or GIF89a stream or to a GIF87a stream.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TGIFConverter::TGIFConverter

TGIFConverter ()

Interface Category:

API.

Purpose:

Default constructor.

Calling Context:

Called by clients to create a converter object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGIFConverter::CreateFrom

TModifiableImage * CreateFrom (TStream & gifStream)

Interface Category:

API.

Purpose:

Converts the data on the input stream into a TModifiableImage. The input stream is expected to be in GIF87a or GIF89a format. The caller owns the TModifiableImage object that is created and is responsible for deleting the object when finished. This converter has a complete understanding of the GIF87a format, and should be able to convert any GIF87a compatible data stream. It has a limited understanding of the GIF89a extensions. The GIF89a extension fields are parsed, but the information in the fields is ignored, with one exception: The GIF89a graphic extension block transparent color index information is honored.

Calling Context:

Called to convert a GIF87a or GIF89a stream into a Modifiable Image.

Parameters:

Return Value:

The decoded image.

Exceptions:

Throws TGIFConverterException if the input stream is not an GIF87a or GIF89a stream, or if the input stream contains bad data. Passes all other exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TGIFConverter::ConvertTo

  1. void ConvertTo (const TImage & theImage, TStream & outputStream)
  2. void ConvertTo (const MGraphic & mgraphic, TStream & outputStream)

Interface Category:

API.

Purpose:

  1. Converts a TImage to a GIF87a stream.
  2. Converts a MGraphic to a GIF87a stream

Calling Context:

  1. Call this function directly.
  2. Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.