Click or drag to resize

Jpeg2000EncoderCompressionSize Property

Gets or sets the compression size to use when compressing an image if CompressionMode = Size.

Namespace:  Atalasoft.Imaging.Codec.Jpeg2000
Assembly:  Atalasoft.dotImage.Jpeg2000 (in Atalasoft.dotImage.Jpeg2000.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public uint CompressionSize { get; set; }

Property Value

Type: UInt32
The maximum file size (in bytes) for lossy compression. In general the final size will be exactly the requested size or a few bytes lower. The minumum value is 500 bytes, which is required for hearder information. Default value 0 means lossless.
Exceptions
ExceptionCondition
ArgumentOutOfRangeException Thrown if the value is not equal to 0 and less than 500.
Examples
C#:
using Atalasoft.Imaging;
using Atalasoft.Imaging.Codec;
...
AtalaImage myImage = new AtalaImage("imagefile.jpg");
myImage.Save("imagefile.jp2", new Jpeg2000Encoder(Jp2CompressionMode.Size, 131072), null);
See Also