kevinmarrec / nuxt-pwa-module

⚠️ DEPRECATED ⚠️ Zero config PWA solution for Nuxt 3
MIT License
338 stars 32 forks source link

Improve icon generation to reduce cutoff #44

Closed manniL closed 1 year ago

manniL commented 1 year ago

Follow-up of #40 Thanks to https://github.com/kevinmarrec/nuxt-pwa-module/commit/8c1f8e2c715ca1416d5d3c6d4a7059fe49f8a99b, the generation is running through now but the icon is cut off when height > width.

It'd be ideal to termine whether height > width, then running sharp(input).resize(undefined, Math.floor(size)) and else running `sharp(input).resize(Math.floor(size))


Result with current state:

grafik

Result with (harcoded) patch:

grafik

kevinmarrec commented 1 year ago

Yeah I didn't know what to do regarding not squared icons, if undefined on resize function works well I'm gonna do adjustments.

Thanks for feedback !

kevinmarrec commented 1 year ago

@manniL Could you provide the image you used please ? 💚

manniL commented 1 year ago

Sure! https://gubutler.com/icon.png

kevinmarrec commented 1 year ago

@manniL Thanks, I found a better way to handle it, and also made splashs working with all icon sizes !

Closing through https://github.com/kevinmarrec/nuxt-pwa-module/commit/f342fa895110ad4525c8e46a9ca5574413dc4b15

Released in v0.6.1

manniL commented 1 year ago

Awesome!