nurpax / petmate

PETSCII editor with Electron/React/Redux
MIT License
183 stars 14 forks source link

Export images in larger resolution #187

Closed Krad23 closed 4 years ago

Krad23 commented 4 years ago

It would be great to be able to export the images at a higher resolution for use as desktop wallpaper, or as sprites in non c64 games.

Krad23 commented 4 years ago

I've actually started working on this and should have a PR soon. Hopefully the issue is accepted :D

What I'm doing is I have replaced the double pixels check mark with a number box that allows you to set scale. So instead of being able to export at x1 and x2 you can set how much you want to scale the image up.

nurpax commented 4 years ago

Sounds great! I’d go for integer scale so that 2x, 3x, 4x etc scaling works by just replicating pixels. Scaling by say 3.2x doesn’t feel too useful.

This way scaling the image is a bit easier and the output looks good for pixel graphics.

Krad23 commented 4 years ago

Yea exactly what I've done ^^. I've modified the doublePixels function so that it works with scale instead but left the mechanism the same.

PR incoming in a few min.

nurpax commented 4 years ago

Thanks to @Krad23, arbitrary pixel scale export for PNG is now supported.