SilenceLeo / snowb-bmf

Bitmap Font Generator Online
https://snowb.org
MIT License
377 stars 90 forks source link

Part with low alpha are not detected properly #70

Closed MikelVazquez closed 1 year ago

MikelVazquez commented 1 year ago

I'm creating 2 fonts where one it's going to be the shadow of the one on top, so to have perfect control on both I'm creating an area bigger than the letters with alpha = 0.01, but the program is cutting those parts off.

I'm using Chome Version 113.0.5672.127 (Official Build) (64-bit) Same happens in Firefox

Really great program BTW! Thanks for doing it!

image

SilenceLeo commented 1 year ago

Yes, the current default threshold for alpha trim is 0.039 (10/255), so 0.01 will be trimmed. I will set it to 0 to meet your requirements.

https://github.com/SilenceLeo/snowb-bmf/blob/f08527a14e7ea30739377ffe892c3444bacf5375/src/utils/getTrimImageInfo.ts#L9

MikelVazquez commented 1 year ago

Thanks a lot!!! ❤️

MikelVazquez commented 1 year ago

Hi Leo! Sorry to bother you but the problem persists. Do I need to do something in a different way? image

SilenceLeo commented 1 year ago

@MikelVazquez Please send the original image so that I can debug it more easily.

MikelVazquez commented 1 year ago

Sure! Thank you so much Leo! Really appreciated :) bitmapfont.zip

SilenceLeo commented 1 year ago

It's a PWA caching issue. You can resolve it by forcibly deleting the old application in the browser's developer tools.

I will investigate and fix the application update problem.

image
MikelVazquez commented 1 year ago

Awesome! I did that and now I can see that it's working. Thanks a lot Leo, you are a star :)