Class LoadOptions
نام ها : Aspose.Imaging جمع آوری: Aspose.Imaging.dll (25.4.0)
گزینه های بارگذاری را نشان می دهد.
[JsonObject(MemberSerialization.OptIn)]
public class LoadOptions
Inheritance
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; }
ارزش املاک
Examples
مثال زیر نشان می دهد که چگونه برای تنظیم محدودیت حافظه در هنگام بارگذاری یک تصویر CMX. محدودیت حافظه حداکثر اندازه مجاز (در مگابایت) برای تمام حافظه های داخلی است.
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. محدودیت حافظه حداکثر اندازه مجاز (در مگابایت) برای تمام حافظه های داخلی است.
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; }
ارزش املاک
DataBackgroundColor
دریافت یا تنظیم Aspose.Imaging.Image پس زمینه Aspose.Imaging.Color.
public Color DataBackgroundColor { get; set; }
ارزش املاک
Remarks
به طور معمول رنگ پس زمینه زمانی تنظیم می شود که ارزش پیکسل به دلیل فساد داده ها بازگردانده نمی شود.
DataRecoveryMode
دریافت یا تنظیم حالت بازیابی داده ها.
public DataRecoveryMode DataRecoveryMode { get; set; }
ارزش املاک
ProgressEventHandler
به دست آوردن یا قرار دادن روند رویداد معامله گر.
[JsonProperty]
public ProgressEventHandler ProgressEventHandler { get; set; }
ارزش املاک
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; }
ارزش املاک
Methods
AddCustomFontSource(بایگانی برچسب ها: params object[])
منبع فونت سفارشی را برای ارائه فونت های خاص تصویر اضافه کنید.
public void AddCustomFontSource(CustomFontSource source, params object[] args)
Parameters
source
CustomFontSource
قابلیت ارائه دهنده منبع فونت سفارشی
args
object
[ ]
این استدلال ها