Dang, I finally found this again.
It's bad when you have a bad gameboy port in deflemask lying around but neither remember what the original submission was nor it's license. I just called it 'jazz'
I did not notice at first, that this json format encodes a color mapping and not palettes.
switchpalette.sh actually takes two palettes and maps every color in the first one to the color with the same index in the second one, that works with RGBA. I wrote loadgpl becaus I worked with a lot of subpalettes who shared colors at that time. The implementation of switchpalette.sh also has problems, because one color is mapped after another, this leads to errors when source and target palettes share colors. This also leads to errors, you sometimes do not immediately notice, when the source image has some wrong color values. That's one of the main reasons why I hated that I had to do such a translation in javascript, but I think I replaced all colors at the same time there.
GitHub has nice tools for visual diffs between binary images. I'm happy to consider other alternatives if you have ideas, but git/GitHub still seems like the most obvious solution for the time being...
gitg and such tools also have image diffs integrated
I don't think size itself will be much of an issue with 64x64/32x32 pixelart.
Edit regarding size:
Indexed PNGs can be smaller.
On example "Bascinet, Raised, Plumage.png":
Original size: 54.2KiB (8bit RGBA)
Just running optipng: 12.3KiB (4bit indexed)
Filling all transparent colors with black in GIMP and then making black transparent, then saving with maximum compression and minimal additional data: 31.6KiB (8bit RGBA)
Just saving it again with mtPaint makes it grow to 32.4KiB (8bit RGBA), that's the difference in PNG compresison different tools do with highest level (9) compression.
Running optipng on this: 10.5KiB (4bit indexed)
Just making the gimp image into 8bit paletted with mtPaint: 11.5KiB (8bit indexed)
mtPaint does not support <8bit. It can be seen that cleaning up transparent colors can also make quite a different. The first run of optipng actually created an indexed image with an alpha channel, there is no index marked as transparent, I'm not sure whether that's a non-standard thing to do or not.
Color values make a difference because of the RLE, which is part of the DEFLATE algorithm, which again PNG uses for compression.
So that's a different thing we should/could take into account. All transparent area should have the same color. Original LPC spritesheets already do that wrong. If you use paletted PNG with just one index being transparent, you are guaranteed to not do that. But disabling alpha in the editor (that's different from removing it from the image) should be the same, it allows you to see what colors are transparent.
edit2:
The automated way with Image Macick + pngcrush + optipng would be:
file=Bascinet,\ Raised,\ Plumage.png; magick "${file}" -background black -flatten -transparent black "${file}_im.png"; pngcrush -rem alla -rem text "${file}_im.png" "${file}_cru.png"; optipng "${file}_cru.png" -out "${file}_opti.png"
Optipng only saves 10 bytes in this example, since pngcrush already compressed it well.
Is pyxeledit capable of opening indexed PNG? Does it only restrict saving to RGBA?
Sorry, what I was thinking about was taking one index/shape image and making say 10 different recolors with 10 different palettes.
You can just call it multiple times for that. There is a bit more overhead, because the image has to be read multiple times, but that's about it.
I'd prefere to focus on subpalettes
I haven't figured out how we should handle objects with multiple "materials" (e.g. several independent color palettes). For instance, the base bodies and their eyes, or the helmets that ElizaWy just posted and their red plumes. I suppose an advantage of the JSON palettes here is that different materials could have different standard palettes, which could be concatenated unambiguously.
You basically can do that with gpl too, it's a color per row and the readers just ignored any lines which werent RGB values. I don't know if that's standard conform and I have to test if pillow is capable of reading that. But you can also properly concatenate them with something like cp whatever.gpl whatever_new.gpl; tail whatever2.gpl -n+5 >> whatever_new.gpl or you can filter them out with something like sed "/^\(#\|GIMP\|Name\|Columns\)/d" whatever2.gpl >> whatever_new.gpl
I'd like to allow to feed multiple palettes into my tool, as well as an offset if you just wanna change one subpalette. It should keep the other colors in the palette untouched and also keep the transparent index.
I always place subpalettes one after another and sort them darkest to lightest color.
I should try to switch to pillow, it's more likely to be already installed and it should be doable. It does come with it's own .gpl reader, but my code size will very likely grow.
Next issue would be a duplimap written with pillow, since I really hate what Image Magick does to the palette. Currently I have to do palette swapping before I feed things into Image Magick.
GitLFS has the same centralization issues like SVN, the images are all stored at one place. I don't know how strongly they are connected to domains, but that could make it hard to preserve or fork hard.
This could prove to handy for GameBoy Color minidemos. The bootrom allows to load a few 4x4 tiles upscaled to 8x8
https://opengameart.org/content/lpc-farming-tilesets-magic-animations-an... I think, that's what "Daneeklu's originals" is supposed to link to
What do you mean with pixels per unit?
LPC has 32x32 tiles
I made a fantasy game boy title screen from the title screen and the boss: https://opengameart.org/content/dead-boy
"Tannenbaum" works, but "Baum" doesn't. Maybe they tried to find parts of the compound words.
I basically always Ctrl-A Ctrl-C before I reply.
Occurs always when I use tripple dots, correct quotes and correct apostrophe. (edit: each single one of them breaks it)
https://n0paste.tk/WmI04lg/
Hehe, I fixed the character order.
But be warned, the alignment is also off.
Dang, I finally found this again.
It's bad when you have a bad gameboy port in deflemask lying around but neither remember what the original submission was nor it's license. I just called it 'jazz'
I did not notice at first, that this json format encodes a color mapping and not palettes.
switchpalette.sh actually takes two palettes and maps every color in the first one to the color with the same index in the second one, that works with RGBA. I wrote loadgpl becaus I worked with a lot of subpalettes who shared colors at that time. The implementation of switchpalette.sh also has problems, because one color is mapped after another, this leads to errors when source and target palettes share colors. This also leads to errors, you sometimes do not immediately notice, when the source image has some wrong color values. That's one of the main reasons why I hated that I had to do such a translation in javascript, but I think I replaced all colors at the same time there.
gitg and such tools also have image diffs integrated
I don't think size itself will be much of an issue with 64x64/32x32 pixelart.
Edit regarding size:
Indexed PNGs can be smaller.
On example "Bascinet, Raised, Plumage.png":
Original size: 54.2KiB (8bit RGBA)
Just running optipng: 12.3KiB (4bit indexed)
Filling all transparent colors with black in GIMP and then making black transparent, then saving with maximum compression and minimal additional data: 31.6KiB (8bit RGBA)
Just saving it again with mtPaint makes it grow to 32.4KiB (8bit RGBA), that's the difference in PNG compresison different tools do with highest level (9) compression.
Running optipng on this: 10.5KiB (4bit indexed)
Just making the gimp image into 8bit paletted with mtPaint: 11.5KiB (8bit indexed)
mtPaint does not support <8bit. It can be seen that cleaning up transparent colors can also make quite a different. The first run of optipng actually created an indexed image with an alpha channel, there is no index marked as transparent, I'm not sure whether that's a non-standard thing to do or not.
Color values make a difference because of the RLE, which is part of the DEFLATE algorithm, which again PNG uses for compression.
So that's a different thing we should/could take into account. All transparent area should have the same color. Original LPC spritesheets already do that wrong. If you use paletted PNG with just one index being transparent, you are guaranteed to not do that. But disabling alpha in the editor (that's different from removing it from the image) should be the same, it allows you to see what colors are transparent.
edit2:
The automated way with Image Macick + pngcrush + optipng would be:
file=Bascinet,\ Raised,\ Plumage.png; magick "${file}" -background black -flatten -transparent black "${file}_im.png"; pngcrush -rem alla -rem text "${file}_im.png" "${file}_cru.png"; optipng "${file}_cru.png" -out "${file}_opti.png"
Optipng only saves 10 bytes in this example, since pngcrush already compressed it well.
Are the grayscale images grayscale with alpha?
Is pyxeledit capable of opening indexed PNG? Does it only restrict saving to RGBA?
You can just call it multiple times for that. There is a bit more overhead, because the image has to be read multiple times, but that's about it.
I'd prefere to focus on subpalettes
You basically can do that with gpl too, it's a color per row and the readers just ignored any lines which werent RGB values. I don't know if that's standard conform and I have to test if pillow is capable of reading that. But you can also properly concatenate them with something like cp whatever.gpl whatever_new.gpl; tail whatever2.gpl -n+5 >> whatever_new.gpl or you can filter them out with something like sed "/^\(#\|GIMP\|Name\|Columns\)/d" whatever2.gpl >> whatever_new.gpl
I'd like to allow to feed multiple palettes into my tool, as well as an offset if you just wanna change one subpalette. It should keep the other colors in the palette untouched and also keep the transparent index.
I always place subpalettes one after another and sort them darkest to lightest color.
I should try to switch to pillow, it's more likely to be already installed and it should be doable. It does come with it's own .gpl reader, but my code size will very likely grow.
Next issue would be a duplimap written with pillow, since I really hate what Image Magick does to the palette. Currently I have to do palette swapping before I feed things into Image Magick.
GitLFS has the same centralization issues like SVN, the images are all stored at one place. I don't know how strongly they are connected to domains, but that could make it hard to preserve or fork hard.
Pages