ImageFactory.imageAsResized returns null

I tried using ImageFactory.imageAsResized to resize images.

but several times for some images it returns null.

I want to know if there is any specification for the images we want to upload.

this code may show my problem

var saveImageData = ImageFactory.imageAsResized(image, {
                        width : 480,
                        height : 360
                    });

        if (saveImageData !== null) {
        var toast = Titanium.UI.createNotification({
                    duration : 1000,
                    message : "save true "+saveImageData
                });
                toast.show();

    } else{
        var toast = Titanium.UI.createNotification({
                duration : 1000,
                message : "Problem in image resizing "+saveImageData
                        });
                toast.show();
};

in this above codec several times i got null.whats is the reason for this?

Does it depend on the size of the image we upload?

if this is correct .. then for an image of the same size, its impressions are several times null, sometimes not null. What a problem this is. I can not handle this ImageFactory functionality.

please give some solution. Because I ran into this problem in my application.

Thanks to everyone.

+3
1

, . -, ImageFactory . i.e Titanium.Blob.imageAsResized

, "image" . image.imageAsResized(480,360);

,

0

All Articles