freshplanet / ANE-ImagePicker

Air Native Extension for mobile camera and gallery features (iOS + Android)
Apache License 2.0
80 stars 48 forks source link

If you don't specify an Album, the ANE creates an image of 1px x 1px #41

Open interactivemartin opened 9 years ago

interactivemartin commented 9 years ago

This works:

camera.displayCamera(onDisplayCameraFinished, 1000, 1000, false, false, "Album");

This doesn't (it creates a 1px x 1px image): camera.displayCamera(onDisplayCameraFinished, 1000, 1000);

Peaking your AirImage.as I see that you are not setting the maxImageWidth and maxImageHeight, if there is no AlbumName provided, which can be the cause for this glitch.

I do not wish to save captured images locally, or at least not at all in the user's cameraRoll.

Can you correct it? :) Thanks!

        if(_isAndroid) {
            if (albumName != null) _context.call("displayCamera", maxImageWidth, maxImageHeight, allowVideo, crop, albumName, chatLink);
            else _context.call("displayCamera", allowVideo, crop);
        } else {
            if (albumName != null) _context.call("displayCamera", maxImageWidth, maxImageHeight, allowVideo, crop, albumName);
            else _context.call("displayCamera", allowVideo, crop);
        }
jkpatel1463 commented 7 years ago

Hello All

Same result is found for Image picker for Android. I specified -1 as width and height and it returns 1x1 image. I need same image as it is without change of the image's dimension. It works in iPhone while android returns 1x1 image.

Here is my code:

if (AirImagePicker.instance.getGalleryPermissionStatus() ==AirImagePickerPermissionStatus.DENIED 
|| AirImagePicker.instance.getGalleryPermissionStatus() ==AirImagePickerPermissionStatus.RESTRICTED)
{
    //show popup which inform user that he do not approve the permission
    // to access photos/Storage
    return;
}
else
{
    AirImagePicker.instance.displayImagePicker(-1, -1, false);
}