/// <summary> /// Gets the depth representation information. /// </summary> /// <param name="id">The depth image id.</param> /// <returns>The depth representation information.</returns> /// <exception cref="HeifException">A LibHeif error occurred.</exception> /// <exception cref="ObjectDisposedException">The object has been disposed.</exception> public HeifDepthRepresentationInfo GetDepthRepresentationInfo(HeifItemId id) { VerifyNotDisposed(); HeifDepthRepresentationInfo depthRepresentationInfo = null; SafeDepthRepresentationInfo safeDepthRepresentationInfo = null; try { if (LibHeifNative.heif_image_handle_get_depth_image_representation_info(this.imageHandle, id, out safeDepthRepresentationInfo)) { unsafe { var info = (heif_depth_representation_info *)safeDepthRepresentationInfo.DangerousGetHandle(); depthRepresentationInfo = new HeifDepthRepresentationInfo(info); } } } finally { safeDepthRepresentationInfo?.Dispose(); } return(depthRepresentationInfo); }