Right now, palette swapping can be a pain if you want to map colors in the palette to other colors not in the image's palette. Having the ability to create a palette image that could be used as a translation would assist with this.
What I'm thinking is that you can create a palette image in RGBA format, with 1 pixel per palette entry, read left to right, top to bottom (so dimensions don't matter, only that it has the right amount of pixels). Pixels with an alpha component of 0% indicate "do not translate this palette entry", while anything else has its alpha component set to 100% (is this a good idea? I'm not sure) and used as the color to translate that palette entry to. Using a palette image in a translation would be possible by using "lumpOrPath" as the translation string, or "file:lumpOrPath" if a name alone is too ambiguous. I see no reason why palette images couldn't reside within graphics/.
Are there any issues with that specification?
[Convenience] Create translations from palette images
Moderator: GZDoom Developers
- axredneck
- Posts: 357
- Joined: Mon Dec 11, 2017 2:09 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Russia
- Contact:
Re: [Convenience] Create translations from palette images
Another variant: apply one image's palette to another indexed image.
(excuse me for my bad English)
(excuse me for my bad English)