excellenteasy / grunt-image-resize

Unmaintained. If you'd like to take this over please let us know. Resizing images made easy - thanks to imagemagick.
MIT License
57 stars 46 forks source link

Got "Cannot read property 'width' of undefined" #14

Open dnbard opened 10 years ago

dnbard commented 10 years ago

This function 71 line: gm(filepath).size(function(err, size) { } returns size that equals undefined. I've installed ImageMagick and all needed libs. (convert -help are working)

Grunt config:

image_resize: {
            '16px':{
                options: {
                    width: 16,
                    height: 16,
                    overwrite: true
                },
                files: [{
                    expand: true,
                    src: ['input/*.png'],
                    dest: 'out/'
                }]
            }
    }

And in fact some files are processed(until task find an error) 2014-06-03_2320

OS: Windows7

Upd: It's definitely not a wrong path issue.

frostney commented 10 years ago

I'm having the same issue. I'm also on Windows 7, ImageMagick is installed correctly.

nickjanssen commented 10 years ago

+1, on OS X

nordhagen commented 10 years ago

+1 (osx)

rweng commented 10 years ago

In my case, on OS X, an older version of imagemagick was installed. I don't know about windows, but if it works partially I'd expect it to be the same problem.

Reinstalling did the trick on OS X (don't forget to update brew if you didn't before):

$ brew unlink imagemagick
Unlinking /usr/local/Cellar/imagemagick/6.8.0-10... 63 symlinks removed

$ brew install imagemagick
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/imagemagick-6.8.9-1.mavericks.bo
######################################################################## 100.0%
==> Pouring imagemagick-6.8.9-1.mavericks.bottle.tar.gz
MarkusPint commented 9 years ago

+1 (win 7)