Table of contents
Swift
Objective-C

This documentation is deprecated. It applies only to legacy version 9.x of Barcode Reader and must not be used for new development.

Please refer to the latest documentation and Migration Guide, which supersede this content.

ImageDecoding Sample

ImageDecoding sample shows how to pick an image from system album and decode the image.

View the sample:

Generally, you can use the following methods to decode an image file:

Different from processing the video streaming, the read rate performance is much more important when processing a single image. It is suggested to switch to the PresetTemplate to IMAGE_READ_RATE to improve the read rate performance.

In ImageDecoding sample, the image file picked from album is firstly read in the memory and displayed on the view. As a result, it is processed by method decodeFileInMemory. You can also use a similar way to get the file path of the image file and process it with decodeFile. You can get full code of how to extract the file path from another sample: PerformanceSettings.

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: