Conversion Considerations

Conversion from one file format to another can take place when you load or save a file, or when you perform file-to-file conversion using one of the overload methods of Convert. Use the Leadtools.Converters assembly to convert from and to a Leadtools.RasterImage and WPF or iOS / macOS objects, or Android classes.

The conversion process can include simultaneous resizing of an image. The process can also change the image's bits per pixel. The conversion process takes longer if either of these additional changes is included.

When reducing a file to a 4-bit or 8-bit format from a 24-bit or 32-bit format, LEADTOOLS must reduce the number of colors. Therefore, the image cannot be converted back to the original image format and retain its original colors.

When converting from 24 bits or less to a 32-bit file, the alpha channel will be filled with zeroes. If you load a LEAD or JPEG file, converting it to 8 bits per pixel while loading, LEADTOOLS dithers the image using the fixed palette. If you would rather have an optimized palette, you should first load it as a 24-bit image; then use the ColorResolutionCommand class to reduce the image using an optimized palette.

Help Version 21.0.2021.11.1
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Imaging, Medical, and Document

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.