         // Dispose of any resources that can be recreated.
     }
     
-    func calculateSize() {
+    func calculateSize(imageInformDic :[Int : CKImageInformation]) {
         var sampleSize = CGSize.zero
         for  (_, inform) in self.imageInformationDic {
             if inform.size.height > inform.size.width {

        
        let count = urls.count
        var loadedCount :Int = 0
        for url in urls {
            let backendSize = self.sizeByURLBlock!(url)
            if  backendSize == CGSize.zero {

                    if let image = image, let url = url {
                        let imageInfo = CKImageInformation(url: url, size: image.size, orientation: image.imageOrientation)
                        let index = self.imageUrls.index(of: url)
                        tmpImageInformationDic[index!] = imageInfo
                        loadedCount += 1
                    }
                    
                    if loadedCount == count {
                        self.calculateSize(imageInformDic: tmpImageInformationDic)
                    }
                    else {
                        self.retryTimes += 1
