antscloud / fretboardgtr

Python package for creating fretboard and chord diagram image in svg format
GNU Affero General Public License v3.0
112 stars 17 forks source link

PNGExporter actually exports GIF files #25

Closed EricDuminil closed 10 months ago

EricDuminil commented 10 months ago

Describe the bug When exporting a fretboard with format 'png', a gif file (possibly with extension '.png') is written instead.

To Reproduce fretboard.export("my_fretboard.png", format="png")

Expected behavior A PNG file should be written.

reportlab.graphics.renderPM.drawToFile seems to default to GIF. Specifying fmt='PNG' in PNGExporter should fix the problem.

antscloud commented 10 months ago

Nice catch, thank you ! Either the API of renderPM has changed or this is a miss from the refactoring

antscloud commented 10 months ago

You should be good to go with a fresh install

pip install fretboardgtr --upgrade
EricDuminil commented 10 months ago

Thanks for the quick feedback! It works fine now.