/// <summary> /// Initializes a new instance of the <see cref="TJCompressor"/> class. /// </summary> /// <exception cref="TJException"> /// Throws if internal compressor instance can not be created. /// </exception> public TJCompressor() { this.compressorHandle = TurboJpegImport.TjInitCompress(); if (this.compressorHandle == IntPtr.Zero) { TJUtils.GetErrorAndThrow(); } }