Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
SoJPEGImageRW Class Reference

VSG extension Class for encoding and decoding a JPEG raster image More...

#include <Inventor/image/SoJPEGImageRW.h>

+ Inheritance diagram for SoJPEGImageRW:

Public Member Functions

virtual SoType getTypeId () const
 Returns the type identifier for this specific instance.
 
 SoJPEGImageRW ()
 Constructor.
 
virtual ~SoJPEGImageRW ()
 Destructor.
 
virtual SbBool open (SoRasterImageIO *rasterImageIO, OpenMode openMode)
 Opens the reader/writer in the specified open mode.
 
virtual void close ()
 Closes the reader/writer.
 
virtual SbBool write (SbRasterImage *rasterImage, unsigned int xPos=0, unsigned int yPos=0)
 Writes and encodes the given data in this specific format.
 
virtual SbBool writeFooter ()
 Writes and encodes the header for this specific format.
 
virtual SbBool read (SbRasterImage *rasterImage, SbBool infoOnly=FALSE)
 Reads, decodes, and fills the rasterImage parameter.
 
virtual SbBool isMultipleBufferInverted () const
 Specifies the write direction when using multiple buffers.
 
virtual SoRasterImageRW::WriteCapability getWriteCapability () const
 Returns the write capability of the raster format.
 
virtual SoRasterImageRW::ReadCapability getReadCapability () const
 Returns the read capability of the raster format.
 
void setOutputQuality (float quality)
 Sets the output quality of the image, from 0.0 (lowest quality) to 1.0 (highest quality).
 
float getOutputQuality () const
 Returns the output quality.
 
- Public Member Functions inherited from SoRasterImageRW
virtual ~SoRasterImageRW ()
 Destructor.
 
virtual SbBool checkRead (SoRasterImageFile *imageFile)
 Checks if the specified file can be read.
 
virtual SbBool writeHeader (const SbVec2i32 &size)
 Writes and encodes the header for this specific format.
 
virtual SbBool readRegion (SbRasterImage *rasterImage, const SbBox2i32 &region)
 Read the specified region of current open image into rasterImage.
 
virtual SbStringgetSuffixes (int &numSuffixes) const
 Returns the list of file suffixes supported.
 
virtual void enableMultipleWriting (SbBool state)
 Enable writing image with multiple calls to write method.
 
virtual SbBool isMultipleWritingEnabled () const
 Returns TRUE if multiple buffer writing is enabled.
 
virtual SoDEPRECATED SbBool writeHeader (SbVec2i32 &size)
 Writes and encodes the header for this specific format.
 
virtual SoDEPRECATED SbBool writeHeader (SbVec2s &size)
 Writes and encodes the header for this specific format.
 

Static Public Member Functions

static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
- Static Public Member Functions inherited from SoRasterImageRW
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 

Additional Inherited Members

- Public Types inherited from SoRasterImageRW
enum  WriteCapability {
  WRITE_SCANLINES ,
  WRITE_FULL_IMAGE ,
  WRITE_UNAVAILABLE
}
 Write Capability enumeration values. More...
 
enum  ReadCapability {
  READ_AVAILABLE ,
  READ_UNAVAILABLE
}
 Read Capability enumeration values. More...
 
enum  OpenMode {
  OPEN_READ ,
  OPEN_WRITE
}
 open Mode enumeration values. More...
 

Detailed Description

VSG extension Class for encoding and decoding a JPEG raster image

This class is used for encoding and decoding a JPEG raster image.

The writeCapability is WRITE_SCANLINES and isMultipleBufferInverted is TRUE.

See SoRasterImageRW for more information and code examples.

SEE ALSO

SoRasterImageFile, SoRasterImageRW, SbRasterImage

Definition at line 52 of file SoJPEGImageRW.h.

Constructor & Destructor Documentation

◆ SoJPEGImageRW()

SoJPEGImageRW::SoJPEGImageRW ( )

Constructor.

◆ ~SoJPEGImageRW()

virtual SoJPEGImageRW::~SoJPEGImageRW ( )
virtual

Destructor.

Member Function Documentation

◆ close()

virtual void SoJPEGImageRW::close ( )
virtual

Closes the reader/writer.

Reimplemented from SoRasterImageRW.

◆ getClassTypeId()

static SoType SoJPEGImageRW::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getOutputQuality()

float SoJPEGImageRW::getOutputQuality ( ) const

Returns the output quality.

◆ getReadCapability()

virtual SoRasterImageRW::ReadCapability SoJPEGImageRW::getReadCapability ( ) const
virtual

Returns the read capability of the raster format.

Reimplemented from SoRasterImageRW.

◆ getTypeId()

virtual SoType SoJPEGImageRW::getTypeId ( ) const
virtual

Returns the type identifier for this specific instance.

Implements SoRasterImageRW.

◆ getWriteCapability()

virtual SoRasterImageRW::WriteCapability SoJPEGImageRW::getWriteCapability ( ) const
virtual

Returns the write capability of the raster format.

Reimplemented from SoRasterImageRW.

◆ isMultipleBufferInverted()

virtual SbBool SoJPEGImageRW::isMultipleBufferInverted ( ) const
virtual

Specifies the write direction when using multiple buffers.

Returns FALSE if buffers are written from top to bottom. Returns TRUE if buffers are written from bottom to top.

Reimplemented from SoRasterImageRW.

◆ open()

virtual SbBool SoJPEGImageRW::open ( SoRasterImageIO rasterImageIO,
OpenMode  openMode 
)
virtual

Opens the reader/writer in the specified open mode.

Reimplemented from SoRasterImageRW.

◆ read()

virtual SbBool SoJPEGImageRW::read ( SbRasterImage rasterImage,
SbBool  infoOnly = FALSE 
)
virtual

Reads, decodes, and fills the rasterImage parameter.

If infoOnly is TRUE, then the buffer will not be read; the parameter rasterImage will be set with raster size and raster number of components, the buffer will be NULL.

Implements SoRasterImageRW.

◆ setOutputQuality()

void SoJPEGImageRW::setOutputQuality ( float  quality)

Sets the output quality of the image, from 0.0 (lowest quality) to 1.0 (highest quality).

Default is 0.7

◆ write()

virtual SbBool SoJPEGImageRW::write ( SbRasterImage rasterImage,
unsigned int  xPos = 0,
unsigned int  yPos = 0 
)
virtual

Writes and encodes the given data in this specific format.

If you are using the multiple writing mode, then you can specify the offset (with xPos,yPos) you want to write to.

Implements SoRasterImageRW.

◆ writeFooter()

virtual SbBool SoJPEGImageRW::writeFooter ( )
virtual

Writes and encodes the header for this specific format.

Reimplemented from SoRasterImageRW.


The documentation for this class was generated from the following file: