Copyright ã1995 by Netsurfer, Inc., All Rights Reserved.  

SurfJPEGDecoder 

Inherits From:	SurfDecoder
Declared In:	SurfJPEGSupport.subproj/SurfJPEGDecoder

Class Description
 
Implements a JPEG/JFIF image decoder.

Instance Variables
 
struct surfjpeg_decompress_struct jpegDecompInfo;
struct surfjpeg_error_mgr jpegErrMgr;
unsigned rowsRead;
unsigned readCount;
unsigned totalRows;
unsigned char **rowPtrBuf;

jpegDecompInfo 	jpeg decoder struct

jpegErrMgr 	jpeg error manager

rowsRead 	rows read so far

readCount 	# of rows to decode per pass (default 5)

totalRows 	total rows in image

rowPtrBuf 	row decoding buffer

Method Types
 
 Instantiation 	+ sharedInstance

Class query 	+ imageUnfilteredFileTypes
+ canLoadFromStream:

JPEG Custom Configuration 	- setReadCount:
- readCount

Class Methods
 
canLoadFromStream:
+ (BOOL)canLoadFromStream:(NXStream *)stream

Returns YES if an instance of this decoder class can decode the image contained in stream.  This is by no means a definitive answer.  Restores the seek state of stream before returning. 

imageUnfilteredFileTypes
+ (const char *const *)imageUnfilteredFileTypes

Returns a NULL terminated array of file extensions instances of this decoder class can decode. 

sharedInstance
+ sharedInstance

Shared instance management.  Just for convenience; not a requirement. 

Instance Methods
 
readCount
- (unsigned) readCount

Returns the number of rows that will be read during each decoding pass. 

setReadCount:
- (void) setReadCount:(unsigned)aNum

Sets the readCount to aNum and reallocates rowPtrBuf, as necessary.