فئة EmfOptions
محتويات
[
يخفي
]Summary: The Emf options.
Module: aspose.imaging.imageoptions
Full Name: aspose.imaging.imageoptions.EmfOptions
Inheritance: IMetadataContainer, IHasExifData, IHasMetadata, IHasXmpData, MetafileOptions
Constructors
| Name | الوصف |
|---|---|
| EmfOptions() | يقوم بإنشاء نسخة جديدة من الفئة EmfOptions |
Properties
| Name | Type | Access | الوصف |
|---|---|---|---|
| buffer_size_hint | int | r/w | يحصل أو يعيّن تلميح حجم المخزن المؤقت الذي يُعرف كأقصى حجم مسموح به لجميع المخازن الداخلية. |
| compress | bool | r/w | يحصل أو يضبط قيمة تشير إلى ما إذا كان هذا ICompressedOptions مضغوطًا. |
| تم التخلص | bool | r | يحصل على قيمة تشير إلى ما إذا كانت هذه المثيلة تم التخلص منها. |
| exif_data | ExifData | r/w | يحصل أو يعيّن كائن Exif. |
| full_frame | bool | r/w | يحصل أو يعيّن قيمة تشير إلى ما إذا كان [full frame]. |
| keep_metadata | bool | r/w | يحصل على قيمة ما إذا كان يجب الاحتفاظ ببيانات التعريف الأصلية للصورة عند التصدير. |
| multi_page_options | MultiPageOptions | r/w | خيارات الصفحات المتعددة |
| palette | IColorPalette | r/w | يحصل أو يضبط لوحة الألوان. |
| resolution_settings | ResolutionSetting | r/w | يحصل أو يضبط إعدادات الدقة. |
| source | Source | r/w | يحصل أو يضبط المصدر لإنشاء الصورة فيه. |
| vector_rasterization_options | VectorRasterizationOptions | r/w | يحصل أو يضبط خيارات تحويل المتجه إلى نقطية. |
| xmp_data | XmpPacketWrapper | r/w | يحصل أو يضبط بيانات Xmp. |
Methods
| Name | الوصف |
|---|---|
| clone() | ينشئ نسخة متماثلة لهذا الكائن. |
| try_set_metadata(metadata) | يحاول ضبط مثال metadata، إذا كان مثال هذا Image يدعم ويطبق مثال IImageMetadataFormat . |
Constructor: EmfOptions()
EmfOptions()
يقوم بإنشاء نسخة جديدة من الفئة EmfOptions
Method: clone()
clone()
ينشئ نسخة متماثلة لهذا الكائن.
Returns
| نوع | الوصف |
|---|---|
| ImageOptionsBase | نسخة متماثلة لهذا الكائن. |
Method: try_set_metadata(metadata)
try_set_metadata(metadata)
يحاول ضبط مثال metadata، إذا كان مثال هذا Image يدعم ويطبق مثال IImageMetadataFormat .
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| metadata | IImageMetadataFormat | البيانات الوصفية. |
Returns
| نوع | الوصف |
|---|---|
| bool | صحيح إذا كان metadata غير فارغ وكانت نسخة IMetadataContainer تدعم و/أو تنفذ نسخة IImageMetadataFormat; وإلا، خطأ. |
Examples
The following example shows how to convert a emz images to emf format
import aspose.pycore as aspycore
from aspose.imaging import Image, SizeF
from aspose.imaging.imageoptions import EmfRasterizationOptions, EmfOptions
from os.path import join
file: str = "example.emz"
base_folder: str = join("D:", "Compressed")
input_file: str = join(base_folder, file)
out_file: str = input_file + ".emf"
with Image.load(input_file) as image:
obj_init = EmfRasterizationOptions()
obj_init.page_size = aspycore.cast(SizeF, image.size)
obj_init2 = EmfOptions()
obj_init2.vector_rasterization_options = obj_init
image.save(out_file, obj_init2)
The following example shows how to convert a emf images to emz format
from os.path import join as path_combine
import aspose.pycore as aspycore
from aspose.imaging import Image, SizeF
from aspose.imaging.imageoptions import EmfRasterizationOptions, EmfOptions
file = "input.emf"
base_folder = path_combine("D:", "Compressed")
input_file = path_combine(base_folder, file)
out_file = input_file + ".emz"
with Image.load(input_file) as image:
vector_rasterization_options = EmfRasterizationOptions()
vector_rasterization_options.page_size = aspycore.cast(SizeF, image.size)
obj_init2 = EmfOptions()
obj_init2.vector_rasterization_options = vector_rasterization_options
obj_init2.compress = True
image.save(out_file, obj_init2)