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:
- TStream & fromStream -The stream the object streams itself in from.
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:
- TStream & toStream -The stream the object streams itself out to.
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
- TGIFConverterException (ErrorCode)
- TGIFConverterException (const TGIFConverterException &)
- TGIFConverterException ()
Interface Category:
API.
Purpose:
- Create an exception with the given ErrorCode.
- Copy constructor.
- Default constructor.
Calling Context:
- Called by the GIFConverter Class
- Called to copy an object.
- Called by the stream-in operators and directly.
Parameters:
- ErrorCode see TGIFConverter :: TGIFConverterException :: ErrorCode
- const TGIFConverterException & -The object to copy.
- Takes no parameters.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
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.
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:
- TStream & gifStream -The stream that contains the GIF87a or GIF89a encoded image.
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
- void ConvertTo (const TImage & theImage, TStream & outputStream)
- void ConvertTo (const MGraphic & mgraphic, TStream & outputStream)
Interface Category:
API.
Purpose:
- Converts a TImage to a GIF87a stream.
- Converts a MGraphic to a GIF87a stream
Calling Context:
- Call this function directly.
- Call this function directly.
Parameters:
- const TImage & theImage -input image.
- TStream & outputStream -stream containing GIF87a image.
- const MGraphic & mgraphic -input mgraphic.
- TStream & outputStream -stream containing GIF87a image.
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.