kirjavascript / Flex2

sega megadrive sprite editor
MIT License
61 stars 4 forks source link

Colours don't convert into index 0 unless it's through Sprite sheet importing #39

Closed VAdaPEGA closed 1 year ago

VAdaPEGA commented 3 years ago

When using "Import Over Sprite", index 0 from the palette isn't being considered as the transparency colour at all, making it impossible to use an opaque image for any small changes. This isn't the case for the "Import spritesheet" function, which automatically assumes the background colour as transparent. This can get really annoying for updating any existing sprites when you mainly use a tool that doesn't support transparency (such as MSPaint) and have to rely on a separate program to remove the background colour.

Sprite example used for importing : image

Expected Result : image

Actual Result : image

kirjavascript commented 3 years ago

yeah this is intentional. using pixel 0 works well for a spritesheet because it usually contains multiple sprites and that pixel will not be in range of sprites to affect them.

with a single sprite that pixel is part of the sprite - there are usecases that cause issues (like importing an image of a single colour and have the tiles be that colour, rather than transparency)

it would still be nice to allow users to have this transparency detection too though, so, I'll try and have a configuration option for it in the next version

flamewing commented 3 years ago

Note that VAdaPEGA mentioned "index 0 of the palette", not pixel 0. I would assume that he is importing a palleted image using the same palette that is used in-game.

kirjavascript commented 3 years ago

aha, my mistake. yeah this is a bug then and I'll get it fixed

kirjavascript commented 1 year ago

fixed in 1.3.0