// Generic versions of jpeg_abort and jpeg_destroy that work on either // flavor of JPEG object. These may be more convenient in some places. /// <summary> /// Abort processing of a JPEG compression or decompression operation, /// but don't destroy the object itself. /// /// Closing a data source or destination, if necessary, is the /// application's responsibility. /// </summary> public void jpeg_abort() { /* Reset overall state for possible reuse of object */ if (IsDecompressor) { m_global_state = JpegState.DSTATE_START; /* Try to keep application from accessing now-deleted marker list. * A bit kludgy to do it here, but this is the most central place. */ jpeg_decompress_struct s = this as jpeg_decompress_struct; if (s != null) s.m_marker_list = null; } else { m_global_state = JpegState.CSTATE_START; } }
// Generic versions of jpeg_abort and jpeg_destroy that work on either // flavor of JPEG object. These may be more convenient in some places. /// <summary> /// <para> /// Abort processing of a JPEG compression or decompression operation, /// but don't destroy the object itself. /// </para> /// <para> /// Closing a data source or destination, if necessary, is the /// application's responsibility. /// </para> /// </summary> public void JpegAbort() { /* Reset overall state for possible reuse of object */ if (IsDecompressor) { globalState = JpegState.DSTATE_START; /* Try to keep application from accessing now-deleted marker list. * A bit kludgy to do it here, but this is the most central place. */ if (this is JpegDecompressStruct s) { s.m_marker_list = null; } } else { globalState = JpegState.CSTATE_START; } }
/// <summary> /// Destruction of a JPEG object. /// /// Closing a data source or destination, if necessary, is the /// application's responsibility. /// </summary> public void jpeg_destroy() { // mark it destroyed m_global_state = JpegState.DESTROYED; }
/// <summary> /// <para>Destruction of a JPEG object. </para> /// <para> /// Closing a data source or destination, if necessary, is the /// application's responsibility. /// </para> /// </summary> public void JpegDestroy() { // mark it destroyed globalState = JpegState.DESTROYED; }