Interface IMultipageImage
Interface IMultipageImage
ชื่อพื้นที่: Aspose.Imaging การประกอบ: Aspose.Imaging.dll (25.4.0)
อินเตอร์เฟซภาพหลายหน้า
public interface IMultipageImage
Examples
ตัวอย่างต่อไปนี้แสดงให้เห็นว่าวิธีการส่งออกภาพ vector มัลติหน้าไปยังรูปแบบอื่นโดยทั่วไปโดยไม่ต้องอ้างอิงถึงประเภทภาพเฉพาะ
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 [ ]