StephenGregory / google-music-desktop-wallpapers

Generate wallpapers from your hot jams

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Default Google Play Music Thumbnail source does not retrieve PNGs correctly

StephenGregory opened this issue · comments

Stack traces:

TypeError: Cannot read property 'length' of null
index.js:150
    at new Jimp (/Users/stephen.gregory/gmusicHooks/node_modules/jimp/index.js:150:53)
/Users/stephen.gregory/gmusicHooks/node_modules/jimp/index.js:150
        var bitmap = new Buffer(original.bitmap.data.length);
                                                    ^
TypeError: Cannot read property 'length' of null
    at new Jimp (/Users/stephen.gregory/gmusicHooks/node_modules/jimp/index.js:150:53)
    at Jimp.clone (/Users/stephen.gregory/gmusicHooks/node_modules/jimp/index.js:541:17)

Not working:

Working (for comparison):

Can no longer reproduce this.

Seems that doing

Jimp.read(imageBuffer).then((albumArt) => {

// create wallpaper

})
.catch((error) => log.error(err));

handles png buffers well.

What I am doing, (new Jimp(imageBuffer, () => {})) does not.