<tfoot id='oUusn'></tfoot>

      <legend id='oUusn'><style id='oUusn'><dir id='oUusn'><q id='oUusn'></q></dir></style></legend>

        <i id='oUusn'><tr id='oUusn'><dt id='oUusn'><q id='oUusn'><span id='oUusn'><b id='oUusn'><form id='oUusn'><ins id='oUusn'></ins><ul id='oUusn'></ul><sub id='oUusn'></sub></form><legend id='oUusn'></legend><bdo id='oUusn'><pre id='oUusn'><center id='oUusn'></center></pre></bdo></b><th id='oUusn'></th></span></q></dt></tr></i><div id='oUusn'><tfoot id='oUusn'></tfoot><dl id='oUusn'><fieldset id='oUusn'></fieldset></dl></div>

        <small id='oUusn'></small><noframes id='oUusn'>

          <bdo id='oUusn'></bdo><ul id='oUusn'></ul>
      1. iOS 8 照片套件.从 iCloud 照片共享相册中获取最大尺寸的图像

        iOS 8 PhotoKit. Get maximum-size image from iCloud Photo Sharing albums(iOS 8 照片套件.从 iCloud 照片共享相册中获取最大尺寸的图像)
          <tbody id='7iCic'></tbody>

              <tfoot id='7iCic'></tfoot>

              <small id='7iCic'></small><noframes id='7iCic'>

                <bdo id='7iCic'></bdo><ul id='7iCic'></ul>
              • <i id='7iCic'><tr id='7iCic'><dt id='7iCic'><q id='7iCic'><span id='7iCic'><b id='7iCic'><form id='7iCic'><ins id='7iCic'></ins><ul id='7iCic'></ul><sub id='7iCic'></sub></form><legend id='7iCic'></legend><bdo id='7iCic'><pre id='7iCic'><center id='7iCic'></center></pre></bdo></b><th id='7iCic'></th></span></q></dt></tr></i><div id='7iCic'><tfoot id='7iCic'></tfoot><dl id='7iCic'><fieldset id='7iCic'></fieldset></dl></div>
                <legend id='7iCic'><style id='7iCic'><dir id='7iCic'><q id='7iCic'></q></dir></style></legend>
                1. 本文介绍了iOS 8 照片套件.从 iCloud 照片共享相册中获取最大尺寸的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  如何从 iСloud 访问全尺寸图像?每次我尝试获取这张图片时,我都会得到 256x342 的图片大小.我也看不到进展.

                  How get access to the full-size images from iСloud? Every time I try to get this picture, I get image size 256x342. I not see progress too.

                  代码:

                      PHFetchResult *result = [PHAsset fetchAssetsWithLocalIdentifiers:@[assetIdentifier] options:nil];
                      PHImageManager *manager = [PHImageManager defaultManager];
                      [result enumerateObjectsUsingBlock:^(PHAsset *asset, NSUInteger idx, BOOL *stop) {
                  
                          PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
                          options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
                          options.synchronous = YES;
                          options.networkAccessAllowed = YES;
                          options.progressHandler = ^(double progress, NSError *error, BOOL *stop, NSDictionary *info) {
                              NSLog(@"%f", progress);
                          };
                  
                          [manager requestImageForAsset:asset targetSize:PHImageManagerMaximumSize contentMode:PHImageContentModeDefault options:options resultHandler:^(UIImage *resultImage, NSDictionary *info)
                           {
                               UIImage *image = resultImage;
                               NSLog(@"%@", NSStringFromCGSize(resultImage.size));
                           }];
                      }];
                  

                  在我点击照片应用程序中的图片之前,这张图片的质量会很差.但是只要我点击图片,它就会下载到设备上,并且是全尺寸的.

                  Until I click the picture in Photo app, this picture will be of poor quality. But as soon as I click on the picture, it downloaded on the device and will be full-size quality.

                  推荐答案

                  我认为下面应该得到全分辨率的图像数据:

                  I think the below should get the full resolution image data:

                   [manager requestImageDataForAsset:asset 
                                             options:options 
                                       resultHandler:^(NSData *imageData, NSString *dataUTI, UIImageOrientation orientation, NSDictionary *info) 
                               { 
                                    UIImage *image = [UIImage imageWithData:imageData]; 
                  
                                    //...
                  
                               }];
                  

                  WWDC 视频中介绍了整个照片框架 (PhotoKit):https://developer.apple.com/videos/wwdc/2014/#511

                  The entire Photos Framework (PhotoKit) is covered in the WWDC video: https://developer.apple.com/videos/wwdc/2014/#511

                  希望这会有所帮助.

                  resultHandler 可以被调用两次.我在 30:00 左右链接到的视频对此进行了解释.可能是您只获得了缩略图,而完整的图像将在第二次调用时出现.

                  The resultHandler can be called twice. This is explained in the video I linked to at around 30:00. Could be that you are only getting the thumbnail and the full image will come with the second time its called.

                  这篇关于iOS 8 照片套件.从 iCloud 照片共享相册中获取最大尺寸的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  iOS 6 rotations: supportedInterfaceOrientations doesn#180;t work?(iOS 6 旋转:supportedInterfaceOrientations 不起作用?)
                  CABasicAnimation rotate returns to original position(CABasicAnimation 旋转返回原始位置)
                  UITabBarController Rotation Issues in ios 6(ios 6 中的 UITabBarController 旋转问题)
                  iOS: How to run a function after Device has Rotated (Swift)(iOS:设备旋转后如何运行函数(Swift))
                  How to rotate an image 90 degrees on iOS?(如何在 iOS 上将图像旋转 90 度?)
                  iOS 8 Rotation Methods Deprecation - Backwards Compatibility(iOS 8 旋转方法弃用 - 向后兼容性)

                      <bdo id='nPMcq'></bdo><ul id='nPMcq'></ul>

                        <tfoot id='nPMcq'></tfoot>
                        • <i id='nPMcq'><tr id='nPMcq'><dt id='nPMcq'><q id='nPMcq'><span id='nPMcq'><b id='nPMcq'><form id='nPMcq'><ins id='nPMcq'></ins><ul id='nPMcq'></ul><sub id='nPMcq'></sub></form><legend id='nPMcq'></legend><bdo id='nPMcq'><pre id='nPMcq'><center id='nPMcq'></center></pre></bdo></b><th id='nPMcq'></th></span></q></dt></tr></i><div id='nPMcq'><tfoot id='nPMcq'></tfoot><dl id='nPMcq'><fieldset id='nPMcq'></fieldset></dl></div>

                          <small id='nPMcq'></small><noframes id='nPMcq'>

                          <legend id='nPMcq'><style id='nPMcq'><dir id='nPMcq'><q id='nPMcq'></q></dir></style></legend>
                            <tbody id='nPMcq'></tbody>