RaananW / PhoneGap-Image-Resizer

Providing an image resizer plugin for phonegap projects on both Android and iOS
93 stars 89 forks source link

Cordovoa 2.5.0 Uncaught reference #3

Closed thejae closed 11 years ago

thejae commented 11 years ago

Hi there, am suffering from a weird error

04-02 23:41:40.625: E/Web Console(11574): Uncaught TypeError: Cannot call method 'resizeImage' of undefined:249

I have imageresize.js properly loaded after cordova-2.5.0.js.

Here is the code am using:

        var imgSrcPath = $('#preview_a_img').attr('src');
        if(parent.isMobile){  
            window.imageResizer.resizeImage(
              function(data) { 
                var image = document.getElementById('resized');
                image.src = "data:image/jpeg;base64," + data.imageData; 
              }, function (error) {
                console.log("Error : \r\n" + error);
              }, imgSrcPath, 0.5, 0.5, {resizeType:ImageResizer.RESIZE_TYPE_FACTOR ,format:'jpg'});

        }
RaananW commented 11 years ago

Hi, try using the new updated source, the support for newer phonegap versions was re-updated... Let me know if it works.

RaananW commented 11 years ago

I assume it works now? Closing the issue. If anyone has the same issue, please reopen or create a new issue