Class OtgImage

Class OtgImage

名称: Aspose.Imaging.FileFormats.OpenDocument 收藏: Aspose.Imaging.dll (25.4.0)

处理 OpenDocument Template (OTG) 使用我们的 API 绘图图像文件OpenDocument XML 格式与图形内容无缝操作。轻松折叠文件,自定义背景颜色,并调整页面尺寸,确保您的 OTG vector 图形项目的最佳控制和灵活性。

[JsonObject(MemberSerialization.OptIn)]
public class OtgImage : OdImage, IDisposable, IObjectWithBounds, IObjectWithSizeF, IMultipageImage

Inheritance

object DisposableObject DataStreamSupporter Image VectorImage VectorMultipageImage OdImage OtgImage

Implements

IDisposable , IObjectWithBounds , IObjectWithSizeF , IMultipageImage

继承人

OdImage.ReleaseManagedResources() , OdImage.DefaultPage , OdImage.IsCached , OdImage.BitsPerPixel , OdImage.PageCount , OdImage.Metadata , OdImage.Records , VectorMultipageImage.CacheData() , VectorMultipageImage.Crop(Rectangle) , VectorMultipageImage.Resize(int, int, ResizeType) , VectorMultipageImage.Rotate(float) , VectorMultipageImage.Resize(int, int, ImageResizeSettings) , VectorMultipageImage.RotateFlip(RotateFlipType) , VectorMultipageImage.RemoveBackground(RemoveBackgroundSettings) , VectorMultipageImage.RemoveBackground() , VectorMultipageImage.SetPalette(IColorPalette, bool) , VectorMultipageImage.GetEmbeddedImages() , VectorMultipageImage.SaveData(Stream) , VectorMultipageImage.GetSerializedStream(ImageOptionsBase, Rectangle, out int) , VectorMultipageImage.ReleaseManagedResources() , VectorMultipageImage.PageCount , VectorMultipageImage.Pages , VectorMultipageImage.DefaultPage , VectorMultipageImage.IsCached , VectorMultipageImage.BitsPerPixel , VectorMultipageImage.Width , VectorMultipageImage.Height , VectorMultipageImage.PageExportingAction , VectorImage.GetEmbeddedImages() , VectorImage.RemoveBackground() , VectorImage.RemoveBackground(RemoveBackgroundSettings) , VectorImage.Resize(int, int, ResizeType) , VectorImage.Resize(int, int, ImageResizeSettings) , VectorImage.RotateFlip(RotateFlipType) , VectorImage.Crop(Rectangle) , VectorImage.Rotate(float) , VectorImage.Modify(RectangleF, float, float, float) , VectorImage.SizeF , VectorImage.WidthF , VectorImage.HeightF , VectorImage.Width , VectorImage.Height , Image.CanLoad(string) , Image.CanLoad(string, LoadOptions) , Image.CanLoad(Stream) , Image.CanLoad(Stream, LoadOptions) , Image.Create(ImageOptionsBase, int, int) , Image.Create(Image[]) , Image.Create(MultipageCreateOptions) , Image.Create(string[], bool) , Image.Create(string[]) , Image.Create(Image[], bool) , Image.GetFileFormat(string) , Image.GetFileFormat(Stream) , Image.GetFittingRectangle(Rectangle, int, int) , Image.GetFittingRectangle(Rectangle, int[], int, int) , Image.Load(string, LoadOptions) , Image.Load(string) , Image.Load(Stream, LoadOptions) , Image.Load(Stream) , Image.GetProportionalWidth(int, int, int) , Image.GetProportionalHeight(int, int, int) , Image.RemoveMetadata() , Image.CanSave(ImageOptionsBase) , Image.Resize(int, int) , Image.Resize(int, int, ResizeType) , Image.Resize(int, int, ImageResizeSettings) , Image.GetDefaultOptions(object[]) , Image.GetOriginalOptions() , Image.ResizeWidthProportionally(int) , Image.ResizeHeightProportionally(int) , Image.ResizeWidthProportionally(int, ResizeType) , Image.ResizeHeightProportionally(int, ResizeType) , Image.ResizeWidthProportionally(int, ImageResizeSettings) , Image.ResizeHeightProportionally(int, ImageResizeSettings) , Image.RotateFlip(RotateFlipType) , Image.Rotate(float) , Image.Crop(Rectangle) , Image.Crop(int, int, int, int) , Image.Save() , Image.Save(string) , Image.Save(string, ImageOptionsBase) , Image.Save(string, ImageOptionsBase, Rectangle) , Image.Save(Stream, ImageOptionsBase) , Image.Save(Stream, ImageOptionsBase, Rectangle) , Image.GetSerializedStream(ImageOptionsBase, Rectangle, out int) , Image.SetPalette(IColorPalette, bool) , Image.UpdateContainer(Image) , Image.GetCanNotSaveMessage(ImageOptionsBase) , Image.GetFitRectangle(Rectangle) , Image.GetImage2Export(ImageOptionsBase, Rectangle, IImageExporter) , Image.GetFitRectangle(Rectangle, int[]) , Image.OnPaletteChanged(IColorPalette, IColorPalette) , Image.OnPaletteChanging(IColorPalette, IColorPalette) , Image.ReleaseManagedResources() , Image.BitsPerPixel , Image.Bounds , Image.Container , Image.Height , Image.Palette , Image.UsePalette , Image.Size , Image.Width , Image.InterruptMonitor , Image.BufferSizeHint , Image.AutoAdjustPalette , Image.HasBackgroundColor , Image.FileFormat , Image.BackgroundColor , DataStreamSupporter.timeout , DataStreamSupporter.CacheData() , DataStreamSupporter.Save() , DataStreamSupporter.Save(Stream) , DataStreamSupporter.Save(string) , DataStreamSupporter.Save(string, bool) , DataStreamSupporter.SaveData(Stream) , DataStreamSupporter.ReleaseManagedResources() , DataStreamSupporter.OnDataStreamContainerChanging(StreamContainer) , DataStreamSupporter.DataStreamContainer , DataStreamSupporter.IsCached , 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

下面的代码剪辑显示如何将 OTG 图像转换为 PDF 和其他图像格式。

string dir = "c:\\aspose.imaging\\issues\\net\\3567\\";
                                                                                                              string inputFilePath = dir + "VariousObjectsMultiPage.otg";
                                                                                                              Aspose.Imaging.ImageOptionsBase[] options = { new Aspose.Imaging.ImageOptions.PngOptions(), new Aspose.Imaging.ImageOptions.PdfOptions() };
                                                                                                              foreach (Aspose.Imaging.ImageOptionsBase saveOptions in options)
                                                                                                              {
                                                                                                                  string extension = saveOptions is Aspose.Imaging.ImageOptions.PngOptions ? ".png" : ".pdf";
                                                                                                                  using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(inputFilePath))
                                                                                                                  {
                                                                                                                      Aspose.Imaging.ImageOptions.OtgRasterizationOptions otgRasterizationOptions = new Aspose.Imaging.ImageOptions.OtgRasterizationOptions();
                                                                                                                      otgRasterizationOptions.PageSize = image.Size;
                                                                                                                      saveOptions.VectorRasterizationOptions = otgRasterizationOptions;

                                                                                                                      image.Save(inputFilePath + extension, saveOptions);
                                                                                                                  }
                                                                                                              }

Constructors

OtgImage(StreamContainer, LoadOptions)

启动一个新的 Aspose.Imaging.FileFormats.OpenDocument.OtgImage 对象,通过提供流容器和加载选项. 这个制造商允许开发人员有效地加载OTG从流的图像,同时指定自定义加载配置。

public OtgImage(StreamContainer streamContainer, LoadOptions loadOptions)

Parameters

streamContainer StreamContainer

流的。

loadOptions LoadOptions

负载选项。

OtgImage(StreamContainer)

创建 Aspose.Imaging.FileFormats.OpenDocument.OtgImage 类的新对象,通过提供流容器. 此构建器允许开发人员直接从流容器,简化与OTG图像数据的工作过程。

public OtgImage(StreamContainer streamContainer)

Parameters

streamContainer StreamContainer

流量容器。

Properties

FileFormat

此属性提供 OTG 文件格式的访问,提供关键洞察力在图像文件中嵌入的数据类型中,它作为一个关键软件开发人员的参考点,使其能够有效处理OTG在其应用程序中的文件. 通过使用此属性,您可以确定图像文件的具体格式,方便无缝将 OTG 文件集成和处理到其软件系统中。

public override FileFormat FileFormat { get; }

财产价值

FileFormat

Pages

重新收集与图像相关的页面,允许软件开发人员可以有效地访问和操纵每个单个页面。财产便于通过各个操作的页面进行无缝 iteration,提高图像处理应用的功能性和多样性。

public override Image[] Pages { get; }

财产价值

Image ( )

Methods

GetDefaultOptions(对象[])

恢复为图像设置的默认选项,提供方便的如何访问和修改默认设置 此属性确保一致性在运营中,提供与常用案例相匹配的预定设置,简化发展过程。

public override ImageOptionsBase GetDefaultOptions(object[] args)

Parameters

args object ( )

这些论点。

Returns

ImageOptionsBase

默认选项

 中文