How to save images/documents to camera roll

You might want to know how to save the images/documents captured by Dynamsoft Camera SDK to Camera Roll. Below is the code snippet for your reference.

for (id index in dcsView.imageGalleryView.selectedIndices) {
        UIImageWriteToSavedPhotosAlbum([((DcsImage*)[dcsView.buffer get:(NSInteger)index]) uiImage], nil, nil, nil);
guard let indices = dcsView.imageGalleryView.selectedIndices as? [Int] else {
        for index in indices {
            UIImageWriteToSavedPhotosAlbum((dcsView.buffer.get(index) as? DcsImage)!.uiImage(), nil, nil, nil)
Is this page helpful?

Leave a Reply

Your email address will not be published.