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; }
ارزش املاک
PageExportingAction
دریافت یا تنظیم صفحه صادرات عمل.لطفا توجه داشته باشید که تنظیم این روش به طور خودکار منابع صفحه پس از آن اجرا خواهد شد.این کار درست قبل از اینکه هر صفحه ذخیره شود انجام می شود.
PageExportingAction PageExportingAction { get; set; }
ارزش املاک
Pages
صفحات را دریافت کنید.
Image[] Pages { get; }
ارزش املاک
Image [ ]