Class Jpeg2000Options

Class Jpeg2000Options

نام ها : Aspose.Imaging.ImageOptions جمع آوری: Aspose.Imaging.dll (25.4.0)

ایجاد فایل های تصویر JPEG2000 (JP2) با استفاده از API ما، با استفاده از تکنولوژی پیشرفته waveletبرای رمزگذاری محتوای بدون از دست دادن.استفاده از پشتیبانی برای کدک های مختلف، از جملهفشرده سازی غیر قابل بازگرداندن و بدون از دست دادن و همچنین کانتینر های متا داده های XMP، تضمین می کندمتنوعیت و ایجاد تصویر با کیفیت بالا متناسب با نیازهای شما.

public class Jpeg2000Options : ImageOptionsBase, IDisposable, IHasXmpData, IHasMetadata, ICloneable

Inheritance

object DisposableObject ImageOptionsBase Jpeg2000Options

Implements

IDisposable , IHasXmpData , IHasMetadata , ICloneable

اعضای ارثی

ImageOptionsBase.Clone() , ImageOptionsBase.ReleaseManagedResources() , ImageOptionsBase.KeepMetadata , ImageOptionsBase.XmpData , ImageOptionsBase.Source , ImageOptionsBase.Palette , ImageOptionsBase.ResolutionSettings , ImageOptionsBase.VectorRasterizationOptions , ImageOptionsBase.BufferSizeHint , ImageOptionsBase.MultiPageOptions , ImageOptionsBase.FullFrame , ImageOptionsBase.ProgressEventHandler , DisposableObject.Dispose() , DisposableObject.ReleaseManagedResources() , DisposableObject.ReleaseUnmanagedResources() , DisposableObject.VerifyNotDisposed() , DisposableObject.Disposed , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

مثال زیر نشان می دهد که چگونه یک تصویر چند صفحه وکتور را به فرمت JPEG 2000 به طور کلی بدون اشاره به یک نوع تصویر خاص تبدیل کنیم.

string dir = "C:\\aspose.imaging\\net\\misc\\ImagingReleaseQATester\\Tests\\testdata\\2548";
                                                                                                                                                                 string inputFilePath = System.IO.Path.Combine(dir, "Multipage.cdr");
                                                                                                                                                                 string outputFilePath = System.IO.Path.Combine(dir, "Multipage.cdr.j2k");

                                                                                                                                                                 Aspose.Imaging.ImageOptionsBase exportOptions = new Aspose.Imaging.ImageOptions.Jpeg2000Options();

                                                                                                                                                                 using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(inputFilePath))
                                                                                                                                                                 {
                                                                                                                                                                     exportOptions.MultiPageOptions = null;

                                                                                                                                                                     // Export only first two pages. In fact, only one page will be rasterized because JPEG 2000 is not a multi-page format.
                                                                                                                                                                     Aspose.Imaging.IMultipageImage multipageImage = image as Aspose.Imaging.IMultipageImage;
                                                                                                                                                                     if (multipageImage != null && (multipageImage.Pages != null && multipageImage.PageCount > 2))
                                                                                                                                                                     {
                                                                                                                                                                         exportOptions.MultiPageOptions = new Aspose.Imaging.ImageOptions.MultiPageOptions(new Aspose.Imaging.IntRange(0, 2));
                                                                                                                                                                     }

                                                                                                                                                                     if (image is Aspose.Imaging.VectorImage)
                                                                                                                                                                     {
                                                                                                                                                                         exportOptions.VectorRasterizationOptions = (Aspose.Imaging.ImageOptions.VectorRasterizationOptions)image.GetDefaultOptions(new object[] { Aspose.Imaging.Color.White, image.Width, image.Height });
                                                                                                                                                                         exportOptions.VectorRasterizationOptions.TextRenderingHint = Aspose.Imaging.TextRenderingHint.SingleBitPerPixel;
                                                                                                                                                                         exportOptions.VectorRasterizationOptions.SmoothingMode = Aspose.Imaging.SmoothingMode.None;
                                                                                                                                                                     }

                                                                                                                                                                     image.Save(outputFilePath, exportOptions);
                                                                                                                                                                 }

Constructors

Jpeg2000Options()

شروع یک مثال جدید از کلاس Aspose.Imaging.ImageOptions.Jpeg2000Options.

public Jpeg2000Options()

Jpeg2000Options(Jpeg2000Options)

شروع یک مثال جدید از کلاس Aspose.Imaging.ImageOptions.Jpeg2000Options.

public Jpeg2000Options(Jpeg2000Options jpeg2000Options)

Parameters

jpeg2000Options Jpeg2000Options

گزینه های فرمت فایل Jpeg2000 برای کپی تنظیمات از.

Properties

Codec

دریافت یا تنظیم کدک JPEG2000

public Jpeg2000Codec Codec { get; set; }

ارزش املاک

Jpeg2000Codec

Examples

این مثال نشان می دهد که چگونه یک تصویر PNG ایجاد کنید و آن را به JPEG2000 با گزینه های مورد نظر ذخیره کنید.

string dir = "c:\\temp\\";

                                                                                                         // Create a PNG image of 100x100 px.
                                                                                                         using (Aspose.Imaging.FileFormats.Png.PngImage pngImage = new Aspose.Imaging.FileFormats.Png.PngImage(100, 100))
                                                                                                         {
                                                                                                             Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(pngImage);

                                                                                                             // Fill the entire image in red.
                                                                                                             Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush(Aspose.Imaging.Color.Red);
                                                                                                             graphics.FillRectangle(brush, pngImage.Bounds);

                                                                                                             Aspose.Imaging.ImageOptions.Jpeg2000Options saveOptions = new Aspose.Imaging.ImageOptions.Jpeg2000Options();

                                                                                                             // Use the irreversible Discrete Wavelet Transform 9-7
                                                                                                             saveOptions.Irreversible = true;

                                                                                                             // JP2 is the "container" format for JPEG 2000 codestreams.
                                                                                                             // J2K is raw compressed data, without a wrapper.
                                                                                                             saveOptions.Codec = Imaging.FileFormats.Jpeg2000.Jpeg2000Codec.J2K;

                                                                                                             // Save to a file
                                                                                                             pngImage.Save(dir + "output.j2k", saveOptions);
                                                                                                         }

این مثال نشان می دهد که چگونه یک تصویر JPEG2000 را با گزینه های مورد نظر ایجاد کنید و آن را به یک فایل ذخیره کنید.

string dir = "c:\\temp\\";

                                                                                                            Aspose.Imaging.ImageOptions.Jpeg2000Options createOptions = new Aspose.Imaging.ImageOptions.Jpeg2000Options();

                                                                                                            // Use the irreversible Discrete Wavelet Transform 9-7
                                                                                                            createOptions.Irreversible = true;

                                                                                                            // JP2 is the "container" format for JPEG 2000 codestreams.
                                                                                                            // J2K is raw compressed data, without a wrapper.
                                                                                                            createOptions.Codec = Imaging.FileFormats.Jpeg2000.Jpeg2000Codec.J2K;

                                                                                                            // Create a JPEG2000 image of 100x100 px.
                                                                                                            using (Aspose.Imaging.FileFormats.Jpeg2000.Jpeg2000Image jpeg2000Image = new Aspose.Imaging.FileFormats.Jpeg2000.Jpeg2000Image(100, 100, createOptions))
                                                                                                            {
                                                                                                                Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(jpeg2000Image);

                                                                                                                // Fill the entire image in red.
                                                                                                                Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush(Aspose.Imaging.Color.Red);
                                                                                                                graphics.FillRectangle(brush, jpeg2000Image.Bounds);

                                                                                                                // Save to a file
                                                                                                                jpeg2000Image.Save(dir + "sample.output.j2k");
                                                                                                            }

Comments

دریافت یا قرار دادن برچسب های نظرات Jpeg.

public string[] Comments { get; set; }

ارزش املاک

string [ ]

CompressionRatios

دریافت یا تنظیم نسبت فشرده سازی.نسبت های مختلف فشرده سازی برای لایه های متوالینرخ مشخص شده برای هر سطح کیفیت مورد نظر است.فاکتور فاکتورکاهش نرخ مورد نیاز

public int[] CompressionRatios { get; set; }

ارزش املاک

int [ ]

Irreversible

دریافت یا تنظیم یک مقدار نشان می دهد که آیا از DWT 9-7 (واقعی) غیر قابل بازگرداندن استفاده کنید یا از فشرده سازی DWT 5-3 بدون از دست دادن استفاده کنید (به طور پیش فرض).

public bool Irreversible { get; set; }

ارزش املاک

bool

Examples

این مثال نشان می دهد که چگونه یک تصویر PNG ایجاد کنید و آن را به JPEG2000 با گزینه های مورد نظر ذخیره کنید.

string dir = "c:\\temp\\";

                                                                                                         // Create a PNG image of 100x100 px.
                                                                                                         using (Aspose.Imaging.FileFormats.Png.PngImage pngImage = new Aspose.Imaging.FileFormats.Png.PngImage(100, 100))
                                                                                                         {
                                                                                                             Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(pngImage);

                                                                                                             // Fill the entire image in red.
                                                                                                             Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush(Aspose.Imaging.Color.Red);
                                                                                                             graphics.FillRectangle(brush, pngImage.Bounds);

                                                                                                             Aspose.Imaging.ImageOptions.Jpeg2000Options saveOptions = new Aspose.Imaging.ImageOptions.Jpeg2000Options();

                                                                                                             // Use the irreversible Discrete Wavelet Transform 9-7
                                                                                                             saveOptions.Irreversible = true;

                                                                                                             // JP2 is the "container" format for JPEG 2000 codestreams.
                                                                                                             // J2K is raw compressed data, without a wrapper.
                                                                                                             saveOptions.Codec = Imaging.FileFormats.Jpeg2000.Jpeg2000Codec.J2K;

                                                                                                             // Save to a file
                                                                                                             pngImage.Save(dir + "output.j2k", saveOptions);
                                                                                                         }

این مثال نشان می دهد که چگونه یک تصویر JPEG2000 را با گزینه های مورد نظر ایجاد کنید و آن را به یک فایل ذخیره کنید.

string dir = "c:\\temp\\";

                                                                                                            Aspose.Imaging.ImageOptions.Jpeg2000Options createOptions = new Aspose.Imaging.ImageOptions.Jpeg2000Options();

                                                                                                            // Use the irreversible Discrete Wavelet Transform 9-7
                                                                                                            createOptions.Irreversible = true;

                                                                                                            // JP2 is the "container" format for JPEG 2000 codestreams.
                                                                                                            // J2K is raw compressed data, without a wrapper.
                                                                                                            createOptions.Codec = Imaging.FileFormats.Jpeg2000.Jpeg2000Codec.J2K;

                                                                                                            // Create a JPEG2000 image of 100x100 px.
                                                                                                            using (Aspose.Imaging.FileFormats.Jpeg2000.Jpeg2000Image jpeg2000Image = new Aspose.Imaging.FileFormats.Jpeg2000.Jpeg2000Image(100, 100, createOptions))
                                                                                                            {
                                                                                                                Aspose.Imaging.Graphics graphics = new Aspose.Imaging.Graphics(jpeg2000Image);

                                                                                                                // Fill the entire image in red.
                                                                                                                Aspose.Imaging.Brushes.SolidBrush brush = new Aspose.Imaging.Brushes.SolidBrush(Aspose.Imaging.Color.Red);
                                                                                                                graphics.FillRectangle(brush, jpeg2000Image.Bounds);

                                                                                                                // Save to a file
                                                                                                                jpeg2000Image.Save(dir + "sample.output.j2k");
                                                                                                            }
 فارسی