ftp.nice.ch/pub/next/developer/objc/appkit/JPEGology.1.0.s.tar.gz#/jpeg/spec.rtf

This is spec.rtf in view mode; [Download] [Up]

Release 1.0  (Developed under OS 2.2 / OS 3.0)  Copyright 1992 by Georges CHAN.



JpegDecode

	INHERITS FROM	Object
	
	DECLARED IN		JpegDecode.h




CLASS DESCRIPTION

	JpegDecode is an abstract class for reading a  JPEG² (JFIF) file.  By incorporating the JpegDecode class to an application, it will enable such application to read a  JPEG²  file without requiring any prior  conversion of the input  JPEG²  file.The image decoded from the  JPEG²  file are stored  into either an array  of NXBitmapImageRep or an array  of NXImage.

	
METHOD TYPES

Initializing a new  JpegDecode  instance
- initFromFile:


INSTANCE METHODS

initFromFile:
- initFromFile:(const char *) filename
                 bitMap: (id *) bMap
                                          size: (NXSize *) bitMapSize
                                mustSee: (BOOL) flag


Initializes the receiver, a  NXBitmapImageRep (i.e. bMap), with the image specified in filename, which can be a full or relative pathname.  The file should be a  JPEG²   (JFIF) file of version 1.01 or  below.  The size of the  image  is returned through bitMapSize.

The YCbCr color space is the standard color space for  JPEG² (JFIF) color images. Such images need to be converted,  i.e. from the YCbCr color space to the standard RGB  screen color space. If a fatal error occurred during the decoding of  such  an  image, user can  tell  whether or not  the  decoder  should  do the RGB conversion for the partial  image obtained so far.  The mustSee flag is used  for that purpose. If  the  user  wants  to convert to RGB (i.e. desperately need to see the non-bogus picture part) then the mustSee flag must be set  to  YES,  otherwise it  must be set to NO. Note that, if  the  mustSee flag is set to YES then there maybe some wrong information displayed in the last row.  Furthermore, by setting the mustSee flag to NO, no RGB conversion is performed, i.e.  no extra  processing  time is used.

After finishing the initialization, this method returns self.  However, if the new instance can't be initialized or an error occurred during the decoding process, and  nil is returned.


- initFromFile:(const char *)filename
                   image: (id *) im
                                          size: (NXSize *) ImageSize
                                mustSee: (BOOL) flag

Does the same thing as the previous initFromFile method except that the receiver is a  NXImage (i.e. im).



	Note: Due to copyright  reasons, JPEG²  file which  uses arithmetic encoding  is  not  processed.
	             Furthermore, due to the lack of JPEG² sample  file which  uses  CMYK or YIQ color space, thus
	             no test have  been fully done for such files.


	² JPEG = Joint Photographic Expert Group
	    JFIF = JPEG File Interchange Format





These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.