Class PngLoadOptions

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; }

不動産価値

bool

Examples

下記の例では、厳格なモードで PNG ファイルを読む方法を示します. 厳格なモードでは、PNG 画像、例えば未認識のデータブロック、ファイルの予期せぬ終わりにおける潜在的な問題を見つけることができます. このようなファイルは、デフォルト (非厳格) モードで Aspose.Imaging と一般的な視聴者によって開くことができます. しかし、厳格なモードでそれらを開く試みは、適切な例外を引き起こします。

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());
                                                                                                                                                                                                                                                                                                                                                                                                        }
 日本語