#178333 - guybrushthreepwood - Tue Mar 10, 2015 10:06 am
So a class I'm in is using gfx2gba for importing maps / autogenerating map data and creating the tiles/palettes, but the data is reduced in quality to 256 color mode because it can't handle higher quality than that, even though there's no such restriction on the tiled modes itself.
Is there a better tool that can provide similar results code-wise? The coding we're doing is in c and this is a tool that comes with HAM.
#178334 - sverx - Tue Mar 10, 2015 10:50 am
guybrushthreepwood wrote: |
even though there's no such restriction on the tiled modes itself |
Tiled modes are 16 or 256 colors only...
_________________
libXM7|NDS programming tutorial (Italiano)|Waimanu DS / GBA|A DS Homebrewer's Diary
#178335 - guybrushthreepwood - Tue Mar 10, 2015 11:00 am
sverx wrote: |
guybrushthreepwood wrote: | even though there's no such restriction on the tiled modes itself |
Tiled modes are 16 or 256 colors only... |
Oh, really? I guess I was confusing it with mode 4 and assuming the palettes worked the same :/
#178336 - guybrushthreepwood - Tue Mar 10, 2015 11:15 am
I thought that there were 256 palette choices but you could still have 32 x 32 x 32 colors.
gfx2gba can't handle .bmp files not saved in 256 color mode.
#178337 - sverx - Wed Mar 11, 2015 11:15 am
Of course you can choose the 256 colors of your palette from the possible 2^15 colors.
_________________
libXM7|NDS programming tutorial (Italiano)|Waimanu DS / GBA|A DS Homebrewer's Diary
#178338 - guybrushthreepwood - Thu Mar 12, 2015 4:32 am
okay, good, now my problem is the gfx2gba (as well as any others I've seen) only accept 256 color .bmp files as input (as in 256 possible colors, not the large number you said), are there any that take better quality images?
#178339 - sverx - Thu Mar 12, 2015 10:25 am
yes, it accepts only 256 colors image, but these 256 colors can be any color in the 15bpp color range. So you have to generate your images starting from 15bpp images and reduce the color count to max 256, then save in a 256-color 'paletted' format.
_________________
libXM7|NDS programming tutorial (Italiano)|Waimanu DS / GBA|A DS Homebrewer's Diary
#178340 - guybrushthreepwood - Thu Mar 12, 2015 7:11 pm
I guess I'm confused. When using windows paint and saving in 256 color mode, the quality of the colors is obviously changed, even if the picture I'm saving only has a few colors.
How can I save in a "256 color palette" bmp? Can GIMP do it? I was under the impression that bmp you could not change the available colors.
#178341 - sverx - Fri Mar 13, 2015 1:32 pm
I guess every program has its ways to save a BMP in a 256 color mode, unfortunately I can't tell because I'm in no way an expert... I use Paint Shop Pro 5 since years and that's the only software I know.
_________________
libXM7|NDS programming tutorial (Italiano)|Waimanu DS / GBA|A DS Homebrewer's Diary
#178344 - guybrushthreepwood - Tue Mar 17, 2015 4:39 am
I followed the instructions to save an indexed palette 256 color bmp in gimp, and gfx2gba doesn't compile it correctly due to the format. It only accepts normal 256 color bmps with default palette, like if you saved it in windows paint. And that doesn't work because it makes the colors lossy.
So my original question, if a tool that accepts other formats of image exists.
#178345 - AntonioND - Tue Mar 17, 2015 12:35 pm
I'm sure GIMP can save a bmp with 256 arbitraray colors correctly. There is no "default" BMP palette as far as I know.
EDIT: Anyway, just use grit. It comes with devkitARM.
#178346 - guybrushthreepwood - Tue Mar 17, 2015 2:48 pm
Antonio: it can, but when you try to compile with gfx.gba the colors of my tileset were only brown and black (meaning it didn't work correctly) when saved in that manner, even though it appeared correctly in other programs.
Apparently gfx2gba doesn't work with custom palettes...
I'll try grit, thanks.
#178347 - AntonioND - Tue Mar 17, 2015 2:55 pm
There are no custom palettes in bmp. A 256 color bmp must include a palette, so all 256 color bmps have a custom palette, even if MS Paint always uses the same one. The problem is that gfx2gba doesn't know how to read bmp files correctly.
But well, grit can read better formats like png, so it doesn't really matter...