Class PngLoadOptions
이름 공간 : Aspose.Imaging.ImageLoadOptions 모임: Aspose.Imaging.dll (25.4.0)
png 로드 옵션.
[Obsolete("Should be replaced with base \"LoadOptions\" class because it contains ony one obsolete \"StrictMode\" property.")]
public class PngLoadOptions : LoadOptions
Inheritance
object ← LoadOptions ← PngLoadOptions
상속 회원들
LoadOptions.AddCustomFontSource(CustomFontSource, params object[]) , LoadOptions.DataRecoveryMode , LoadOptions.DataBackgroundColor , LoadOptions.UseIccProfileConversion , LoadOptions.BufferSizeHint , LoadOptions.ProgressEventHandler , LoadOptions.ConcurrentImageProcessing , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
PngLoadOptions()
public PngLoadOptions()
Properties
StrictMode
[정확한 모드]가 있는지 여부를 나타내는 값을 얻거나 설정합니다.
[Obsolete("This redundant property should be replaced with an expression: \"LoadOptions.DataRecoveryMode == DataRecoveryMode.ConsistentRecover\".")]
public bool StrictMode { get; set; }
부동산 가치
Examples
다음 예제는 엄격한 모드에서 PNG 파일을 읽는 방법을 보여줍니다. 엄격한 모드는 PNG 이미지, 예를 들어 인식되지 않은 데이터 블록, 예기치 않은 파일 끝에서 잠재적 인 문제를 찾을 수 있습니다. 이러한 파일은 아직도 기본 (비 엄격한) 모드에서 열 수 있습니다.
string dir = "c:\\aspose.imaging\\issues\\net\\3635\\testdata\\3565";
string inputFileName = System.IO.Path.Combine(dir, "FC5F1998104EB92469CB14070628073616BB28F9.png");
string outputFileName = inputFileName + ".png";
// Default mode (non-strict) - successul reading.
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(inputFileName))
{
image.Save(outputFileName, new Aspose.Imaging.ImageOptions.PngOptions());
}
// Strict mode - ImageLoadException : Unexpected end of file.
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(inputFileName, new Aspose.Imaging.ImageLoadOptions.PngLoadOptions() { StrictMode = true }))
{
image.Save(outputFileName, new Aspose.Imaging.ImageOptions.PngOptions());
}