Squeak Class Documentation category index | class index  
 
JPEGReadWriter2
  category: Graphics-Files
  superclass: ImageReadWriter
  subclasses:

I provide fast JPEG compression and decompression. I require the VM pluginJPEGReadWriter2Plugin, which is typically stored in same directory as the Squeak virtual machine.

JPEGReadWriter2Plugin is based on LIBJPEG library. This sentence applies to the plugin:
"This software is based in part on the work of the Independent JPEG Group".

The LIBJPEG license allows it to be used free for any purpose so long as its origin and copyright are acknowledged. You can read more about LIBJPEG and get the complete source code at www.ijg.org.

instance methods
  primitives
  primImageHeight:
primImageWidth:
primJPEGCompressStructSize
primJPEGDecompressStructSize
primJPEGErrorMgr2StructSize
primJPEGPluginIsPresent
primJPEGReadHeader:fromByteArray:errorMgr:
primJPEGReadImage:fromByteArray:onForm:errorMgr:
primJPEGWriteImage:onByteArray:form:quality:progressiveJPEG:errorMgr:

  public access
  compress:quality:
imageExtent:
nextImage
nextImageSuggestedDepth:
nextPutImage:
nextPutImage:quality:progressiveJPEG:
uncompress:into:

  testing
  isPluginPresent
understandsImageFormat

class methods
  no messages
 

instance methods
  primitives top  
 

primImageHeight:


 

primImageWidth:


 

primJPEGCompressStructSize


 

primJPEGDecompressStructSize


 

primJPEGErrorMgr2StructSize


 

primJPEGPluginIsPresent


 

primJPEGReadHeader:fromByteArray:errorMgr:


 

primJPEGReadImage:fromByteArray:onForm:errorMgr:


 

primJPEGWriteImage:onByteArray:form:quality:progressiveJPEG:errorMgr:


  public access top  
 

compress:quality:

Encode the given Form and answer the compressed ByteArray. Quality goes from 0 (low) to 100 (high), where -1 means default.


 

imageExtent:

Answer the extent of the compressed image encoded in the given ByteArray.


 

nextImage

Decode and answer a Form from my stream.


 

nextImageSuggestedDepth:

Decode and answer a Form of the given depth from my stream. Close the stream if it is a file stream. Possible depths are 16-bit and 32-bit.


 

nextPutImage:

Encode the given Form on my stream with default quality.


 

nextPutImage:quality:progressiveJPEG:

Encode the given Form on my stream with the given settings. Quality goes from 0 (low) to 100 (high), where -1 means default. If progressiveFlag is true, encode as a progressive JPEG.


 

uncompress:into:

Uncompress an image from the given ByteArray into the given Form. Fails if the given Form has the wrong dimensions or depth.


  testing top  
 

isPluginPresent


 

understandsImageFormat

Answer true if the image stream format is understood by this decoder.


class methods
  no messages top