adonthell-artwork
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-artwork] Images saving format


From: Alexandre Courbot
Subject: [Adonthell-artwork] Images saving format
Date: 19 Feb 2002 11:05:52 +0100

Don't know whether it fits better in the devel or artwork list, but
whatever...

I am again facing the problem of image saving format. You know that when
you save an animation for example, all the images are saved one after
one in the animation file. The images are currently saved in 24bpp
depth, while the game can run in 16 or 24 bpp depth.

The problem is that when images get loaded, they are converted to the
screen depth, for better performances. That means that on my machine for
example that runs in 16bpp, images are in 16bpp format in memory.

This is a true problem for editors. When editing animation, map objects
or map characters, I have to load and save images. But if I work on a
16bpp machine, the images are loaded, converted to 16bpp, then converted
back to 24bpp when I save them. But of course, you lost some colors
during the 24->16 convertion, which means in this case saving in 24bpp
is useless.

The last time I workarounded this by keeping a copy of the "pure" image
along with the loaded images. That resulted in the creation of the
image_edit class. But as animation, characters and so on needed to use
this class too, I had to create animation_edit, mapcharacter_edit,
etc... classes, with plenty of overloaded methods, which is a pain and
pig work. Moreover, doing so images cannot be modified, as the copy
isn't affected by pixel manipulation. I'm thinking a lot about this
problem since years now and still haven't found something satisfying.

The ideal for the programmer would be to only have one image class to
deal with. As we support both 16 and 24 bpp depths, the easiest (and
only "good" solution I can think of) would be to save our images in
16bpp depth. I don't think this will result in gfx quality degrading,
because the images we use usually don't have that much colors. Also,
looking at Waste's Edge running in 16bpp, there is nothing shocking -
it's just as nice as in 24bpp. Moreover this would also make images
taking less space and being better compressed.

I'm not sure the gfx guys like the idea - please tell me what you think
about this. This problem just come from the fact that we support two
color depths: we have to scale to the lowest one. Of course, if someone
has a working solution for this problem, keeping 24 bpp depth, I'm all
for it. But I'd like we settle that so I can work correctly on the
editors.

Alex.
-- 
http://www.gnurou.org





reply via email to

[Prev in Thread] Current Thread [Next in Thread]