Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library no work #299

Open
cioletti opened this issue Oct 9, 2019 · 3 comments
Open

Library no work #299

cioletti opened this issue Oct 9, 2019 · 3 comments

Comments

@cioletti
Copy link

cioletti commented Oct 9, 2019

Fusuma not work multiply selected image in gallery, button done not get images.
Error is in method

private func requestImage(with asset: PHAsset, cropRect: CGRect, completion: @escaping (PHAsset, UIImage) -> Void) {
DispatchQueue.global(qos: .default).async(execute: {
let options = PHImageRequestOptions()
options.deliveryMode = .highQualityFormat
options.isNetworkAccessAllowed = true
options.normalizedCropRect = cropRect
options.resizeMode = .exact

        let targetWidth  = floor(CGFloat(asset.pixelWidth) * cropRect.width)
        let targetHeight = floor(CGFloat(asset.pixelHeight) * cropRect.height)
        let dimensionW   = max(min(targetHeight, targetWidth), 1024 * UIScreen.main.scale)
        let dimensionH   = dimensionW * self.getCropHeightRatio()

        let targetSize   = CGSize(width: dimensionW, height: dimensionH)

        PHImageManager.default().requestImage(for: asset, targetSize: targetSize, contentMode: .aspectFill, options: options) { result, info in
            guard let result = result else { return }

            DispatchQueue.main.async(execute: {
                completion(asset, result)
            })
        }
    })
}
@cioletti
Copy link
Author

cioletti commented Oct 9, 2019

At IOS 13

@BossOz
Copy link

BossOz commented Nov 18, 2019

the same issue for me!

@siang-chang
Copy link

same issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants