Interface IMultipageImage

Interface IMultipageImage

اسم الفضاء : Aspose.Imaging تجميع: Aspose.Imaging.dll (25.4.0)

واجهة الصور متعددة الصفحات

public interface IMultipageImage

Examples

يظهر المثال التالي كيفية تصدير صورة فيكتور متعددة الصفحات إلى تنسيق آخر بشكل عام دون الإشارة إلى نوع صورة معين.

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.tif");

                                                                                                                                                              Aspose.Imaging.ImageOptionsBase exportOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Aspose.Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

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

                                                                                                                                                                  // Export only first two pages
                                                                                                                                                                  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);
                                                                                                                                                              }

Properties

PageCount

احصل على صفحة العد.

int PageCount { get; }

قيمة الممتلكات

int

PageExportingAction

يحصل أو يضع صفحة تصدير العمل.يرجى ملاحظة أن إعداد هذه الطريقة سوف يطلق تلقائيًا موارد الصفحة بعد أن يتم تنفيذها.سيتم تنفيذها مباشرة قبل أن يتم حفظ كل صفحة.

PageExportingAction PageExportingAction { get; set; }

قيمة الممتلكات

PageExportingAction

Pages

احصل على الصفحات

Image[] Pages { get; }

قيمة الممتلكات

Image [ ]

 عربي