Initializes the unmanaged memory buffered compression engine.
public void StartCompress(
int width,
int height,
int bitsPerPixel,
Leadtools.RasterByteOrder order,
Leadtools.RasterViewPerspective viewPerspective,
int inputDataLength,
IntPtr outputData,
int outputDataLength,
Leadtools.Codecs.CodecsCompression compression,
Leadtools.Codecs.CodecsCompressDataCallback callback
)
Public Overloads Sub StartCompress( _
ByVal width As Integer, _
ByVal height As Integer, _
ByVal bitsPerPixel As Integer, _
ByVal order As Leadtools.RasterByteOrder, _
ByVal viewPerspective As Leadtools.RasterViewPerspective, _
ByVal inputDataLength As Integer, _
ByVal outputData As IntPtr, _
ByVal outputDataLength As Integer, _
ByVal compression As Leadtools.Codecs.CodecsCompression, _
ByVal callback As Leadtools.Codecs.CodecsCompressDataCallback _
)
public void StartCompress(
int width,
int height,
int bitsPerPixel,
Leadtools.RasterByteOrder order,
Leadtools.RasterViewPerspective viewPerspective,
int inputDataLength,
IntPtr outputData,
int outputDataLength,
Leadtools.Codecs.CodecsCompression compression,
Leadtools.Codecs.CodecsCompressDataCallback callback
)
- (BOOL)startCompress:(NSInteger)width
height:(NSInteger)height
bitsPerPixel:(NSInteger)bitsPerPixel
order:(LTRasterByteOrder)order
viewPerspective:(LTRasterViewPerspective)viewPerspective
inputDataLength:(NSUInteger)inputDataLength
outputData:(unsigned char *)outputData
outputDataLength:(NSUInteger)outputDataLength
compression:(LTCodecsCompression)compression
callback:(nullable LTCodecsCompressDataCallback)callback
error:(NSError **)error
function Leadtools.Codecs.RasterCodecs.StartCompress(Int32,Int32,Int32,RasterByteOrder,RasterViewPerspective,Int32,IntPtr,Int32,CodecsCompression,CodecsCompressDataCallback)(
width ,
height ,
bitsPerPixel ,
order ,
viewPerspective ,
inputDataLength ,
outputData ,
outputDataLength ,
compression ,
callback
)
public:
void StartCompress(
int width,
int height,
int bitsPerPixel,
Leadtools.RasterByteOrder order,
Leadtools.RasterViewPerspective viewPerspective,
int inputDataLength,
IntPtr outputData,
int outputDataLength,
Leadtools.Codecs.CodecsCompression compression,
Leadtools.Codecs.CodecsCompressDataCallback^ callback
)
width
The image being compressed width in pixels.
height
The image being compressed height in pixels.
bitsPerPixel
The image being compressed bits/pixel value.
order
The image being compressed byte order.
viewPerspective
The image being compressed view perspective value.
inputDataLength
Size in bytes of the input image data.
outputData
Pointer to unmanaged memory buffer will be filled with the compressed data.
outputDataLength
Size of outputData in bytes.
compression
Type of compression to use. Valid values are:
Value | Meaning |
---|---|
CodecsCompression.Cmp | LEAD CMP compression format |
CodecsCompression.Jpeg444 | JPEG File Interchange Format using YUV 4:4:4 color spacing |
CodecsCompression.Jpeg422 | JPEG File Interchange Format using YUV 4:2:2 color spacing |
CodecsCompression.Jpeg411 | JPEG File Interchange Format using YUV 4:1:1 color spacing |
CodecsCompression.TifJpeg444 | JPEG JTIF using YUV 4:4:4 color spacing |
CodecsCompression.TifJpeg422 | JPEG JTIF using YUV 4:2:2 color spacing |
CodecsCompression.TifJpeg411 | JPEG JTIF using YUV 4:1:1 color spacing |
CodecsCompression.Lead0 | LEAD 1 bit, lossless compression |
CodecsCompression.Lead1 | LEAD 1 bit, excellent compression |
CodecsCompression.TiffCcitt | TIFF CCITT |
CodecsCompression.TiffCcittG3Fax1Dim | CCITT Group 3 one dimensional |
CodecsCompression.TiffCcittG3Fax2Dim | CCITT Group 3 two dimensional |
CodecsCompression.TiffCcittG4Fax | CCITT Group 4 two dimensional |
callback
The callback method responsible for writing or handling the compressed data.
This method initializes the buffered compression engine. The compression is then carried out using the Compress method. It is ended by the StopCompress method.
If order is set to RasterByteOrder.Bgr and viewPerspective is RasterViewPerspective.TopLeft then the data that you put into the input buffer must be RasterByteOrder.Bgr and loaded from top left.
The compression process starts after the first call to Compress. The callback is called when the output buffer is filled with compressed data or after completing the compression process. callback is responsible for emptying the output buffer - storing it, sending it, or doing other processing.
The following is a flow chart that shows the relationship of these methods:
Call StopCompress to end the compression process started by a call to StartCompress.
The quality factor of the compressed data is obtained as follows:
This method does not support signed data images.
For an example, refer to StartCompress.
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.