ImageConvertOptions class

ImageConvertOptions class

Represents options for converting a document to an image file type.

The ImageConvertOptions type exposes the following members:

Constructors

Constructor Description
init Initializes a new ImageConvertOptions instance.

Properties

Property Description
background_color The background color to use where supported by the source format.
brightness The image brightness adjustment.
cap_resolution_to_page_content The property caps the per-page PDF render resolution to the page’s native raster resolution, preventing rendering at a higher DPI than the embedded image and emitting the page at its native (smaller) pixel dimensions and DPI in the final output.
contrast The contrast adjustment applied to the image.
crop_area The crop area of the raster image after conversion.
flip_mode The image flip mode.
format The desired file type the input document should be converted to.
gamma The image gamma adjustment.
grayscale The option indicating whether to convert the image to grayscale.
height The desired image height after conversion.
horizontal_resolution The desired image horizontal resolution after conversion; defaults to the input file’s resolution or 96 dpi.
jpeg_options The JPEG specific convert options.
min_resolution The per-axis lower bound applied to the capped render DPI when ImageConvertOptions.CapResolutionToPageContent is enabled.
page_number The page number to start conversion from.
pages The list of page indexes to be converted. Should be specified to convert specific pages.
pages_count The number of pages to convert starting from PageNumber.
psd_options The PSD-specific convert options.
rotate_angle The image rotation angle.
tiff_options The Tiff specific convert options.
use_pdf The UsePdf property.
vertical_resolution The desired image vertical resolution after conversion. The default resolution is the resolution of the input file or 96 dpi.
watermark The watermark specific options.
webp_options The WebP specific convert options.
width The desired image width after conversion.

Example

from groupdocs.conversion import Converter
from groupdocs.conversion.filetypes import ImageFileType
from groupdocs.conversion.options.convert import ImageConvertOptions

with Converter("slides.pptx") as converter:
    options = ImageConvertOptions()
    options.format = ImageFileType.PNG
    options.page_number = 1
    options.pages_count = 1
    converter.convert("slide-1.png", options)

Guides

Task guides that use ImageConvertOptions:

See Also