Class LoadOptions

Class LoadOptions

ชื่อพื้นที่: Aspose.Imaging การประกอบ: Aspose.Imaging.dll (25.4.0)

แสดงตัวเลือกการโหลด

[JsonObject(MemberSerialization.OptIn)]
public class LoadOptions

Inheritance

object LoadOptions

Derived

CdrLoadOptions , CmxLoadOptions , DngLoadOptions , EpsLoadOptions , Jpeg2000LoadOptions , OdLoadOptions , PngLoadOptions , SvgLoadOptions

อนุญาโตตุลาการ

object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Constructors

LoadOptions()

[JsonConstructor]
public LoadOptions()

Properties

BufferSizeHint

รับหรือตั้งค่าตัวอักษรขนาดกระเป๋าที่กําหนดขนาดที่อนุญาตสูงสุดสําหรับกระเป๋าภายในทั้งหมด

public int BufferSizeHint { get; set; }

คุณสมบัติมูลค่า

int

Examples

ตัวอย่างต่อไปนี้แสดงให้เห็นว่าวิธีการตั้งค่าข้อ จํากัด ของหน่วยความจําเมื่อโหลดภาพ CMX ข้อ จํากัด ของหน่วยความจําคือขนาดที่อนุญาตสูงสุด (ใน megabytes) สําหรับ buffers ภายในทั้งหมด

string dir = "c:\\aspose.imaging\\issues\\net\\3419\\";

                                                                                                                                                                                // Setting a memory limit of 10 megabytes for a target loaded image.
                                                                                                                                                                                using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "example.cmx", new Aspose.Imaging.LoadOptions() { BufferSizeHint = 10 }))
                                                                                                                                                                                {
                                                                                                                                                                                    image.Save(dir + "output.png",
                                                                                                                                                                                        new Aspose.Imaging.ImageOptions.PngOptions()
                                                                                                                                                                                        {
                                                                                                                                                                                            VectorRasterizationOptions =
                                                                                                                                                                                                    new Aspose.Imaging.ImageOptions.CmxRasterizationOptions
                                                                                                                                                                                                    {
                                                                                                                                                                                                        TextRenderingHint = Aspose.Imaging.TextRenderingHint.SingleBitPerPixel,
                                                                                                                                                                                                        SmoothingMode = Aspose.Imaging.SmoothingMode.AntiAlias,
                                                                                                                                                                                                        Positioning = Aspose.Imaging.ImageOptions.PositioningTypes.DefinedByDocument
                                                                                                                                                                                                    }
                                                                                                                                                                                        });
                                                                                                                                                                                }

ตัวอย่างต่อไปนี้แสดงให้เห็นว่าวิธีการตั้งค่าข้อ จํากัด ของหน่วยความจําเมื่อโหลดภาพ JPEG ข้อ จํากัด ของหน่วยความจําคือขนาดที่อนุญาตสูงสุด (ใน megabytes) สําหรับ buffers ภายในทั้งหมด

string dir = "c:\\aspose.imaging\\issues\\net\\3404\\";

                                                                                                                                                                                 // Setting a memory limit of 50 megabytes for target loaded image
                                                                                                                                                                                 using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "inputFile.jpg", new Aspose.Imaging.LoadOptions() { BufferSizeHint = 50 }))
                                                                                                                                                                                 {
                                                                                                                                                                                     image.Save(dir + "outputFile_Baseline.jpg",
                                                                                                                                                                                         new Aspose.Imaging.ImageOptions.JpegOptions
                                                                                                                                                                                         {
                                                                                                                                                                                             CompressionType = Aspose.Imaging.FileFormats.Jpeg.JpegCompressionMode.Baseline,
                                                                                                                                                                                             Quality = 100
                                                                                                                                                                                         });

                                                                                                                                                                                     image.Save(dir + "outputFile_Progressive.jpg",
                                                                                                                                                                                         new Aspose.Imaging.ImageOptions.JpegOptions
                                                                                                                                                                                         {
                                                                                                                                                                                             CompressionType = Aspose.Imaging.FileFormats.Jpeg.JpegCompressionMode.Progressive
                                                                                                                                                                                         });

                                                                                                                                                                                     image.Save(dir + "outputFile_Lossless.jpg",
                                                                                                                                                                                         new Aspose.Imaging.ImageOptions.JpegOptions
                                                                                                                                                                                         {
                                                                                                                                                                                             ColorType = Aspose.Imaging.FileFormats.Jpeg.JpegCompressionColorMode.YCbCr,
                                                                                                                                                                                             CompressionType = Aspose.Imaging.FileFormats.Jpeg.JpegCompressionMode.Lossless,
                                                                                                                                                                                             BitsPerChannel = 4
                                                                                                                                                                                         });

                                                                                                                                                                                     image.Save(dir + "outputFile_JpegLs.jpg",
                                                                                                                                                                                         new Aspose.Imaging.ImageOptions.JpegOptions
                                                                                                                                                                                         {
                                                                                                                                                                                             ColorType = Aspose.Imaging.FileFormats.Jpeg.JpegCompressionColorMode.YCbCr,
                                                                                                                                                                                             CompressionType = Aspose.Imaging.FileFormats.Jpeg.JpegCompressionMode.JpegLs,
                                                                                                                                                                                             JpegLsInterleaveMode = Aspose.Imaging.FileFormats.Jpeg.JpegLsInterleaveMode.None,
                                                                                                                                                                                             JpegLsAllowedLossyError = 3,
                                                                                                                                                                                             JpegLsPreset = null
                                                                                                                                                                                         });
                                                                                                                                                                                 }

ConcurrentImageProcessing

ได้รับหรือตั้งค่าค่าแสดงให้เห็นว่า [การประมวลผลภาพที่แข่งขัน]

public bool ConcurrentImageProcessing { get; set; }

คุณสมบัติมูลค่า

bool

DataBackgroundColor

ได้รับหรือตั้งค่า Aspose.Imaging.Image background Aspose.Imaging.Color

public Color DataBackgroundColor { get; set; }

คุณสมบัติมูลค่า

Color

Remarks

โดยปกติแล้วสีพื้นหลังจะกําหนดเมื่อค่า pixel ไม่สามารถกู้คืนได้เนื่องจากการละเมิดข้อมูล

DataRecoveryMode

รับหรือตั้งค่าโหมดการกู้คืนข้อมูล

public DataRecoveryMode DataRecoveryMode { get; set; }

คุณสมบัติมูลค่า

DataRecoveryMode

ProgressEventHandler

ได้รับหรือตั้งค่ากระบวนการกระบวนการ

[JsonProperty]
public ProgressEventHandler ProgressEventHandler { get; set; }

คุณสมบัติมูลค่า

ProgressEventHandler

Examples

ตัวอย่างต่อไปนี้แสดงให้เห็นวิธีการพิมพ์ข้อมูลเกี่ยวกับเหตุการณ์การพัฒนาสําหรับการดําเนินงานโหลด / การส่งออก

public void Test3460()
                                                                                                                 {
                                                                                                                     string dir = "c:\\aspose.imaging\\net\\issues\\3460";
                                                                                                                     string fileName = System.IO.Path.Combine(dir, "big.png");

                                                                                                                     // Example of use of separate operation progress event handlers for load/export operations
                                                                                                                     using (var image = Aspose.Imaging.Image.Load(fileName, new Aspose.Imaging.LoadOptions { ProgressEventHandler = ProgressCallback }))
                                                                                                                     {
                                                                                                                         image.Save(fileName + ".psd",
                                                                                                                                    new Aspose.Imaging.ImageOptions.PsdOptions() { ProgressEventHandler = ExportProgressCallback });
                                                                                                                     }
                                                                                                                 }

                                                                                                                 private void ProgressCallback(Aspose.Imaging.ProgressManagement.ProgressEventHandlerInfo info)
                                                                                                                 {
                                                                                                                     System.Console.WriteLine("{0} : {1}/{2}", info.EventType, info.Value, info.MaxValue);
                                                                                                                 }

                                                                                                                 private void ExportProgressCallback(Aspose.Imaging.ProgressManagement.ProgressEventHandlerInfo info)
                                                                                                                 {
                                                                                                                     System.Console.WriteLine("Export event {0} : {1}/{2}", info.EventType, info.Value, info.MaxValue);
                                                                                                                 }

                                                                                                                 // The STDOUT log may look like this:
                                                                                                                 //Initialization : 1/4
                                                                                                                 //PreProcessing : 2/4
                                                                                                                 //Processing : 3/4
                                                                                                                 //Finalization : 4/4
                                                                                                                 //Export event Initialization : 1/4
                                                                                                                 //Export event PreProcessing : 2/4
                                                                                                                 //Export event Processing : 3/4
                                                                                                                 //Export event RelativeProgress : 1/1
                                                                                                                 //RelativeProgress : 1/1
                                                                                                                 //Export event Finalization : 4/4

UseIccProfileConversion

ได้รับหรือตั้งค่าค่าแสดงให้เห็นว่าการแปลงโปรไฟล์ ICC จะถูกนํามาใช้หรือไม่

[Obsolete("ICC profile conversion will be used by default and this property will be removed.")]
public bool UseIccProfileConversion { get; set; }

คุณสมบัติมูลค่า

bool

Methods

AddCustomFontSource(CustomFontSource, params วัตถุ[])

เพิ่มแหล่งตัวอักษรที่กําหนดเองเพื่อจัดหาตัวอักษรที่กําหนดเอง

public void AddCustomFontSource(CustomFontSource source, params object[] args)

Parameters

source CustomFontSource

ฟังก์ชั่นการจัดหา font source ที่กําหนดเอง

args object [ ]

ข้อตกลง

 แบบไทย