فئة MetafileOptions
محتويات
[
يخفي
]Summary: The Metafiles base options.
Module: aspose.imaging.imageoptions
Full Name: aspose.imaging.imageoptions.MetafileOptions
Inheritance: IMetadataContainer, IHasExifData, IHasMetadata, IHasXmpData, ImageOptionsBase
Constructors
| Name | الوصف |
|---|---|
| MetafileOptions() | ينشئ مثيلاً جديدًا للفئة MetafileOptions |
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: MetafileOptions()
MetafileOptions()
ينشئ مثيلاً جديدًا للفئة MetafileOptions
Property: compress
يحصل أو يضبط قيمة تشير إلى ما إذا كان هذا ICompressedOptions مضغوطًا.
See also:
Example # 1: The following example shows how to convert a emf images to emz format
Example # 2: The following example shows how to convert a wmf images to wmz format
Method: clone()
clone()
ينشئ نسخة متماثلة لهذا الكائن.
Returns
| نوع | الوصف |
|---|---|
| ImageOptionsBase | نسخة متماثلة لهذا الكائن. |
Method: try_set_metadata(metadata)
try_set_metadata(metadata)
يحاول ضبط مثال metadata، إذا كان مثال هذا Image يدعم ويطبق مثال IImageMetadataFormat .
Parameters:
| معامل | نوع | الوصف |
|---|---|---|
| metadata | IImageMetadataFormat | البيانات الوصفية. |
Returns
| نوع | الوصف |
|---|---|
| bool | صحيح، إذا كان كائن IMetadataContainer يدعم و/أو ينفّذ كائن IImageMetadataFormat; وإلا، خطأ. |
Examples
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)
The following example shows how to convert a wmf images to wmz 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 WmfRasterizationOptions, WmfOptions
file = "castle.wmf"
base_folder = path_combine("D:", "Compressed")
input_file = path_combine(base_folder, file)
out_file = input_file + ".wmz"
with Image.load(input_file) as image:
vector_rasterization_options = WmfRasterizationOptions()
vector_rasterization_options.page_size = aspycore.cast(SizeF, image.size)
obj_init2 = WmfOptions()
obj_init2.vector_rasterization_options = vector_rasterization_options
obj_init2.compress = True
image.save(out_file, obj_init2)