Giter VIP home page Giter VIP logo

Comments (4)

GuoDapeng avatar GuoDapeng commented on July 17, 2024

实际上我这里有一个不是很好的解决办法 ImagePickerMain.m getPictures 方法:

改变回掉的时机,可以避免得到缩略图。

CGSize size = CGSizeMake(self.width, self.height);
            
            // 从asset中获得图片
            [[PHImageManager defaultManager] requestImageForAsset:asset targetSize:size contentMode:PHImageContentModeDefault options:options resultHandler:^(UIImage * _Nullable result, NSDictionary * _Nullable info) {
                
                //NSLog(@"图片名字:%@",fileName);
                
                BOOL downloadFinined = ![[info objectForKey:PHImageCancelledKey] boolValue] && ![info objectForKey:PHImageErrorKey] && ![[info objectForKey:PHImageResultIsDegradedKey] boolValue];
                
                if(downloadFinined){
                    NSString *sanboxPath =  [self saveAndGetImageDocuments:result withName:fileName];
                    [pathsArr addObject: sanboxPath];
                    if([pathsArr count] != 0 && [pathsArr count] == [assets count]){
                        NSLog(@"%@",pathsArr);
                        CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArray:pathsArr];
                        [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
                        //清空选中状态
                        _selectedAssets = nil;
                        
                    }
                }
                
            }];
        }

如果有能里的话,可以尝试写原图拷贝完成的事件。我目前没有时间写这个,所以也无法承诺什么时间可以加上这个功能。

from cordova-plugin-imagepicker.

songlipeng2003 avatar songlipeng2003 commented on July 17, 2024

这块逻辑有点奇怪。明明获取到了photos,保存photos,然后返回就好了,最后又没有使用photos,然后又去使用assets了,重新在使用PHImageManager来获取。
我ios不是很熟,没有太搞懂什么意思

from cordova-plugin-imagepicker.

giantss avatar giantss commented on July 17, 2024

@songlipeng2003 可以去了解一下ios沙盒

from cordova-plugin-imagepicker.

Mr-Anonymous avatar Mr-Anonymous commented on July 17, 2024

This is the same issue as what I experience with the latest version of this plugin on iOS. The image quality if really bad, very pixelated and low resolution. I dont understand, how can I resolve this?

#55

from cordova-plugin-imagepicker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.