chess-image-generator icon indicating copy to clipboard operation
chess-image-generator copied to clipboard

Pieces are blurred.

Open loicmarie opened this issue 3 years ago • 5 comments

Hi, this is a very useful lib, thank you. I was planning to use it for my project, but unfortunately pieces are blurred, as the ones used as a demonstration in the README.

Looking at the source, it seems logical since images are loaded, and then scaled. I think it would be better to generate a vector image instead, and then scale it, and convert it to PNG, to preserve image quality.

I could not find a way to do this with Canvas (using Canvas in a non-web NodeJS env is a little hackish), so I cannot PR something, and ended up making my own script. I thought it would interest you so I made a gift with a simplified version (using Merida style) that generates a SVG file, that next could be easily converted to a high quality PNG file :

https://gist.github.com/loicmarie/6426394790fb0155225fa4994f89cbdf

loicmarie avatar Feb 10 '21 14:02 loicmarie

Looking into fixing this now :)

andyruwruw avatar Feb 11 '21 00:02 andyruwruw

Any updates on this? I'm happy to help if I can.

LandonSchropp avatar Mar 14 '21 05:03 LandonSchropp

@LandonSchropp Got bogged down by a few other projects and school, would be happy to get help or review pull requests! 😄

andyruwruw avatar Mar 14 '21 07:03 andyruwruw

Sure! I'll see if I can't whip something up this week.

LandonSchropp avatar Mar 15 '21 02:03 LandonSchropp

Let me know if you have any questions!

andyruwruw avatar Mar 15 '21 23:03 andyruwruw