![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Remco de Korte
Subject: Re: Single BMP, perhaps you all misunderstood my question
Date: 7 Sep 1999 19:48:22
Message: <37D5A568.4220BC2D@xs4all.nl>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Lutz Kretzschmar wrote:
>
> Hi Remco de Korte, you recently wrote in povray.windows:
>
> > That is a reasonable explanation.
> > The way I think this will work the whole image will be loaded into memory with
> > one single statement and then it's not really relevant anymore though.
> If the image is vertical, blitting from it will be better because the
> bitmap is in contiguous memory, i.e. the CPU cache will do a much
> better job of getting data, it could make it quite a good deal faster.
>
> - Lutz
That is interesting. Thank you for this information! Any idea how big the
difference is? Is it more then trivial?
Remco
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Remco de Korte
Subject: Re: Single BMP, perhaps you all misunderstood my question
Date: 7 Sep 1999 20:01:07
Message: <37D5A864.37261F22@xs4all.nl>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Jon A. Cruz wrote:
>
> Remco de Korte wrote:
>
> > Jon A. Cruz wrote:
> > >
> > > 2) BMP for a game? I'd really suggest trying to stay away from BMP if at
> > > all possible. Store things as PNG and just convert to BITMAP as you read
> > > in.
> >
> > Again: why? What would be the advantage of PNG over BMP? It loads much slower.
> > >
>
> "It loads much slower". That sounds like a start at premature optimization, which
> is the root of all evil. :-)
>
> How much is "much slower". Tests should be made. I'm guessing on the order of
> perhaps a second at the extreme. Depends on your system. Disk speed is going to be
> a bottleneck anyway, and modern processors get quite fast. The main point would be
> to test it in context and see how it works overall.
>
I agree about that. The only thing I can see about it is that my experience with
the different filetypes is that BMPs are read/written immediately while PNGs
tend to take some time. Try to do a batch conversion with 100 images.
> Another thing to consider is when will this apply? Usually this slight slowdown
> would occur once at the begining of the program or level. While a splash screen is
> being displayed. Balance that with having the equivalent of keeping all your
> images ZIPped on disk the entire time the user has the game installed but is not
> playing it.
>
A splashscreen would indeed typically be a large image which doesn't have to
load extremely fast, so PNG would do fine. Since this is about a series of
images I was thinking more about sprites, where speed is more of an issue.
> Also by taking that hit on speed at one point during startup you also buy the
> addition of transparency by color or by alpha channel, etc.
With BMPs you can use transparence by simply declaring a transparent color, as
in GIFs.
>
> Anothing thing that had been mentioned was RLE BMP files. Problem is that RLE
> compression really sucks for most things (that's my professional opinion from
> having worked with RLE a lot :-) Also, using it will make the BMP's incompatible
> with a lot of programs. But at least it's not quite as bad as "right-side-up"
> BMP files.
Yes, RLE is bad. I was trying to keep it at BMPs, but I might as well have
mentioned TGA, PCX (used quite frequently in older games at least) or GIF
(same). It depends on the colordepth you want to use.
>
It looks as though I'm trying to prove PNG is a useless format which is not the
case.
It's just that when someone asks a simple question about how to manipulate some
BMPs someone starts telling he shouldn't use BMPs at all, instead of giving a
simple answer. I don't think that is very helpful, I think it is more
something-I-can't-find-the-right-english-word-for.
Kind regards,
Remco
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Crunchy Frog wrote:
>
> All this talk over a simple question. And no one has posted an answer. I
> know what I am doing. I know all about image format trade-offs, and load
> times, and palettes, etc. I was just hoping for a pointer a nice little
> app that solved my problem. Oh well, I'll write my own.
>
Hold on! I said I had a program that did precisely what you want.
I use it for more or less the same purposes (check out the Frankenvic mentioned
in the animations-group).
Still, writing your own can't be that much trouble.
Toedeledoki!
Remco
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Nieminen Juha
Subject: Re: Single BMP, perhaps you all misunderstood my question
Date: 8 Sep 1999 07:45:01
Message: <37d64c3d@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Remco de Korte <rem### [at] xs4all nl> wrote:
:> RLE doesn't pack very well.
: Agreed. Same with PNG.
PNG packs much better than RLE.
Just compare a RLE-targa and a PNG.
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Remco de Korte
Subject: Re: Single BMP, perhaps you all misunderstood my question
Date: 8 Sep 1999 10:12:46
Message: <37D66FFF.1425367D@xs4all.nl>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Nieminen Juha wrote:
>
> Remco de Korte <rem### [at] xs4all nl> wrote:
> :> RLE doesn't pack very well.
>
> : Agreed. Same with PNG.
>
> PNG packs much better than RLE.
> Just compare a RLE-targa and a PNG.
>
Sure.
But it also depends on the type of image you have.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> Sure.
> But it also depends on the type of image you have.
PNG would still kick RLE's butt.
--
Anthony L. Bennett
http://welcome.to/TonyB
Non nova, sed nove.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Remco de Korte
Subject: Re: Single BMP, perhaps you all misunderstood my question
Date: 8 Sep 1999 16:46:02
Message: <37D6CC25.6BDCCC0D@xs4all.nl>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
TonyB wrote:
>
> > Sure.
> > But it also depends on the type of image you have.
>
> PNG would still kick RLE's butt.
>
Yep, you're right.
PNG's compression is amazing for lossless compression.
I reckoned there would always be a weird case where it could be beaten by
another format (as with JPG vs GIF) but I wouldn't even know where to look.
Man, does this bother me!
I hope it didn't frighten CrunchyFrog into loosing his or her crunchiness.
Ajeto!
Remco
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Remco de Korte wrote:
>
> TonyB wrote:
> >
> > > Sure.
> > > But it also depends on the type of image you have.
> >
> > PNG would still kick RLE's butt.
> >
>
> Yep, you're right.
> PNG's compression is amazing for lossless compression.
> I reckoned there would always be a weird case where it could be beaten by
> another format (as with JPG vs GIF) but I wouldn't even know where to look.
> Man, does this bother me!
> I hope it didn't frighten CrunchyFrog into loosing his or her crunchiness.
Crunch! I guess not, even in milk!
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |