selaux / node-sprite-generator

Generates image sprites and their spritesheets (css, stylus, sass or less) from sets of images. Supports retina sprites. Provides express middleware and grunt task.
MIT License
192 stars 39 forks source link

gm convert: Unrecognized option (-Infinity) #60

Open lewispham opened 7 years ago

lewispham commented 7 years ago

I got the error Unrecognized option when I tried to generate sprites with this options:


            nsg({
                src: [
                    this.config.src + `/*.png`,
                ],
                spritePath: this.config.dest + `/sprite.png`,
                stylesheetPath: this.config.cssDest + `/sprite.css`,
                stylesheet: 'css',
                stylesheetOptions: {
                    prefix: 'icon-',
                },
                compositor: 'gm'
            }, function (err) {
                if(err){
                    throw err;
                }
            });```
selaux commented 7 years ago

Probably a duplicate of #57. But can you check what arguments are passed to renderSprite of the gm compositor?

lewispham commented 7 years ago

@selaux How can I check it?

selaux commented 7 years ago

Just edit the module in node_modules and put a console log just before the call.

lewispham commented 7 years ago

Sorry. I can not reproduce this bug. I'll come back when I have it.

arunprasadr-zz commented 7 years ago

Hey I had the same issue when I was using the default 'vertical' layout while using 'gm' compositor. Switched it to 'packed' and the error disappeared. Hope it helps.