layout | title | description | keywords | needAutoGenerateSidebar | breadcrumbText | permalink |
---|---|---|---|---|---|---|
default-layout |
Image Decoding Sample - Dynamsoft Barcode Reader for iOS |
This is the page of ImageDecoding sample of Dynamsoft Barcode Reader for iOS SDK. |
objectivec-swift, samples, Image Decoding |
true |
ImageDecoding |
/programming/objectivec-swift/samples/image-decoding-v9.6.20.html |
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:
decodeFile
: Decode an image file with a file path.decodeFileInMemory
: Decode an image file in memory.decodeBase64
: Decode an image file in memory with a Base64 string.decodeImage
: DecodeUIImage
.
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.