Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #7655
| Newsgroups | comp.programming |
|---|---|
| Date | 2017-03-28 00:43 -0700 |
| References | <215856a8-c1a4-4a0e-a43f-69f860c2094c@googlegroups.com> <1r3iva2n9wkrb$.1b0qy1961jao6.dlg@40tude.net> |
| Message-ID | <d5669dca-5d49-412b-adbe-730cdac40de3@googlegroups.com> (permalink) |
| Subject | Re: how 2 compress Fat Bitmap |
| From | fir <profesor.fir@gmail.com> |
W dniu wtorek, 28 marca 2017 03:06:23 UTC+2 użytkownik JJ napisał: > On Mon, 27 Mar 2017 09:13:28 -0700 (PDT), fir wrote: > > i get a little big tired when coding roguelike and maybe i could rest > > coding a side problem > > > > in my roguelike i use now 24bpp bitmap to store a tile map, it is > > 2000x2000 pixels (as pixel is something like 'big meter' in game world > > (something like 1.5 m x 1.5 m) this would be like a 3 km x 3 km square of > > land > > > > you could check it packed in > > > > minddetonator.htw.pl/platform12.zip minddetonator.htw.pl/platform14.zip > > > > it is 12 MB bmp file and loading it makes 1 second delay at game startup > > (on my hdd, on some more new hdd could be faster) > > > > but obviously it could be packed, as i use only come sobset of colors on > > this map (it would be at most like few thousands of colors/tile types, > > now i use less than 30) so it may be well packed (it also shopuld be > > simple to pack as i need only pack raw rectangle of pixels, not other > > form of data, bitmap header i may skip at all) > > > > even compressing each pixel into index form - thus reducing 24 bit of > > color into loke 6-12 bit of index would spare to half or 1/4 of oryginal > > size.. yet more elaborate ways of compresing (exploring the fact that > > there are regular patterns of colors not chaotic pixels) could be used > > (zip packs this 12 MB to 80 kB rar packs 12 MB to 60kB) > > > > the question is - what algorithm to use to pack it - it could be > > reasonably simple to write but also maybe something more effective then > > if i would just turn colors to palette entries? > > > > what do you think? > > Are you sure that 1 second delay is spent entirely on reading the bitmap > image? Try using PNG or TIF, instead of BMP. If there's no significant > difference, it would mean that the image is just too large for the computer > you use to test your program. e.g. slow CPU or RAM. im sure
Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
how 2 compress Fat Bitmap fir <profesor.fir@gmail.com> - 2017-03-27 09:13 -0700
Re: how 2 compress Fat Bitmap JJ <jj4public@vfemail.net> - 2017-03-28 08:06 +0700
Re: how 2 compress Fat Bitmap fir <profesor.fir@gmail.com> - 2017-03-28 00:43 -0700
Re: how 2 compress Fat Bitmap fir <profesor.fir@gmail.com> - 2017-03-28 01:02 -0700
Re: how 2 compress Fat Bitmap Ed Prochak <edprochak@gmail.com> - 2017-03-28 10:26 -0700
Re: how 2 compress Fat Bitmap fir <profesor.fir@gmail.com> - 2017-03-28 12:19 -0700
Re: how 2 compress Fat Bitmap fir <profesor.fir@gmail.com> - 2017-03-28 12:25 -0700
Re: how 2 compress Fat Bitmap fir <profesor.fir@gmail.com> - 2017-03-28 12:33 -0700
Re: how 2 compress Fat Bitmap Ed Prochak <edprochak@gmail.com> - 2017-03-30 13:40 -0700
Re: how 2 compress Fat Bitmap fir <profesor.fir@gmail.com> - 2017-03-30 13:50 -0700
Re: how 2 compress Fat Bitmap fir <profesor.fir@gmail.com> - 2017-03-30 13:54 -0700
Re: how 2 compress Fat Bitmap fir <profesor.fir@gmail.com> - 2017-03-30 15:10 -0700
Re: how 2 compress Fat Bitmap Ed Prochak <edprochak@gmail.com> - 2017-04-03 07:11 -0700
Re: how 2 compress Fat Bitmap fir <profesor.fir@gmail.com> - 2017-04-03 08:20 -0700
Re: how 2 compress Fat Bitmap Robert Wessel <robertwessel2@yahoo.com> - 2017-03-28 16:40 -0500
Re: how 2 compress Fat Bitmap fir <profesor.fir@gmail.com> - 2017-03-28 15:19 -0700
csiph-web