C# Class BitMiracle.LibJpeg.JpegImage

Inheritance: IDisposable
Mostra file Open project: prepare/HTML-Renderer Class Usage Examples

Private Properties

Property Type Description
Dispose void
addSampleRow void
compress void
compress void
createFromBitmap void
createFromStream void
decompress void
fillDecompressedData void
fillSamplesFromBitmap void
initializeFromBitmap void
isCompressed bool
needCompressWith bool
processPixelFormat void

Public Methods

Method Description
Dispose ( ) : void

Frees and releases all resources allocated by this JpegImage

FromBitmap ( Bitmap bitmap ) : JpegImage

Creates JpegImage from .NET bitmap

Same as corresponding constructor.

GetRow ( int rowNumber ) : SampleRow

Retrieves the required row of image.

JpegImage ( Stream imageData ) : System

Creates JpegImage from stream with an arbitrary image data

JpegImage ( System bitmap ) : System

Creates JpegImage from .NET bitmap

JpegImage ( string fileName ) : System

Creates JpegImage from file with an arbitrary image

ToBitmap ( ) : Bitmap

Retrieves image as .NET Bitmap.

WriteBitmap ( Stream output ) : void

Writes decompressed image data as bitmap to stream.

WriteJpeg ( Stream output ) : void

Writes compressed JPEG image to stream.

WriteJpeg ( Stream output, CompressionParameters parameters ) : void

Compresses image to JPEG with given parameters and writes it to stream.

Private Methods

Method Description
Dispose ( bool disposing ) : void
addSampleRow ( SampleRow row ) : void

Needs for DecompressorToJpegImage class

compress ( CompressionParameters parameters ) : void
compress ( IRawImage source, CompressionParameters parameters ) : void
createFromBitmap ( System bitmap ) : void
createFromStream ( Stream imageData ) : void
decompress ( ) : void
fillDecompressedData ( ) : void
fillSamplesFromBitmap ( ) : void
initializeFromBitmap ( Bitmap bitmap ) : void
isCompressed ( Stream imageData ) : bool

Checks if imageData contains jpeg image

needCompressWith ( CompressionParameters parameters ) : bool
processPixelFormat ( PixelFormat pixelFormat ) : void

Method Details

Dispose() public method

Frees and releases all resources allocated by this JpegImage
public Dispose ( ) : void
return void

FromBitmap() public static method

Creates JpegImage from .NET bitmap
Same as corresponding constructor.
public static FromBitmap ( Bitmap bitmap ) : JpegImage
bitmap System.Drawing.Bitmap Source .NET bitmap.
return JpegImage

GetRow() public method

Retrieves the required row of image.
public GetRow ( int rowNumber ) : SampleRow
rowNumber int The number of row.
return SampleRow

JpegImage() public method

Creates JpegImage from stream with an arbitrary image data
public JpegImage ( Stream imageData ) : System
imageData Stream Stream containing bytes of image in /// arbitrary format (BMP, Jpeg, GIF, PNG, TIFF, e.t.c)
return System

JpegImage() public method

Creates JpegImage from .NET bitmap
public JpegImage ( System bitmap ) : System
bitmap System Source .NET bitmap.
return System

JpegImage() public method

Creates JpegImage from file with an arbitrary image
public JpegImage ( string fileName ) : System
fileName string Path to file with image in /// arbitrary format (BMP, Jpeg, GIF, PNG, TIFF, e.t.c)
return System

ToBitmap() public method

Retrieves image as .NET Bitmap.
public ToBitmap ( ) : Bitmap
return System.Drawing.Bitmap

WriteBitmap() public method

Writes decompressed image data as bitmap to stream.
public WriteBitmap ( Stream output ) : void
output Stream Output stream.
return void

WriteJpeg() public method

Writes compressed JPEG image to stream.
public WriteJpeg ( Stream output ) : void
output Stream Output stream.
return void

WriteJpeg() public method

Compresses image to JPEG with given parameters and writes it to stream.
public WriteJpeg ( Stream output, CompressionParameters parameters ) : void
output Stream Output stream.
parameters CompressionParameters The parameters of compression.
return void