LoadOptions Klasse

Summary: Represents the loading options.

Module: aspose.imaging

Full Name: aspose.imaging.LoadOptions

Constructors

NameBeschreibung
LoadOptions()Initialisiert eine neue Instanz von LoadOptions.

Properties

NameTypeAccessBeschreibung
buffer_size_hintintr/wLiest oder setzt den Hinweis zur Puffergröße, der die maximal zulässige Größe für alle internen Puffer definiert.
concurrent_image_processingboolr/wLiest oder setzt einen Wert, der angibt, ob [concurrent image processing].
data_background_colorColorr/wLiest oder setzt das Hintergrund-Color des Image.
data_recovery_modeDataRecoveryModer/wLiest oder setzt den Datenwiederherstellungsmodus.
use_icc_profile_conversionboolr/wLiest oder setzt einen Wert, der angibt, ob die ICC-Profilkonvertierung angewendet werden soll.

Constructor: LoadOptions()

 LoadOptions() 

Initialisiert eine neue Instanz von LoadOptions.

Property: buffer_size_hint

Liest oder setzt den Hinweis zur Puffergröße, der die maximal zulässige Größe für alle internen Puffer definiert.

See also:

Example # 1: The following example shows how to set a memory limit when loading a CMX imag…

Examples

The following example shows how to set a memory limit when loading a CMX image. The memory limit is the maximum allowed size (in megabytes) for all internal buffers.

from aspose.imaging import Image, TextRenderingHint, SmoothingMode, PositioningTypes, LoadOptions
from aspose.imaging.imageoptions import PngOptions, CmxRasterizationOptions
import os

directory = "c:\\aspose.imaging\\issues\\net\\3419\\"
	
# Festlegen eines Speicherlimits von 10 Megabyte für ein geladenes Zielbild.
load_options = LoadOptions()
load_options.buffer_size_hint = 10
with Image.load(os.path.join(directory, "example.cmx"), load_options) as image:
	png_options = PngOptions()
	cmx_spec = CmxRasterizationOptions()
	cmx_spec.text_renderingHint = TextRenderingHint.SINGLE_BIT_PER_PIXEL
	cmx_spec.smoothing_mode = SmoothingMode.ANTI_ALIAS
	cmx_spec.positioning = PositioningTypes.DEFINED_BY_DOCUMENT
	png_options.vector_rasterization_options = cmx_spec
	image.save(os.path.join(directory, "output.png"), png_options)