Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #7645 > unrolled thread

how 2 compress Fat Bitmap

Started byfir <profesor.fir@gmail.com>
First post2017-03-27 09:13 -0700
Last post2017-03-28 15:19 -0700
Articles 16 — 4 participants

Back to article view | Back to comp.programming


Contents

  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

#7645 — how 2 compress Fat Bitmap

Fromfir <profesor.fir@gmail.com>
Date2017-03-27 09:13 -0700
Subjecthow 2 compress Fat Bitmap
Message-ID<215856a8-c1a4-4a0e-a43f-69f860c2094c@googlegroups.com>
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? 

[toc] | [next] | [standalone]


#7654

FromJJ <jj4public@vfemail.net>
Date2017-03-28 08:06 +0700
Message-ID<1r3iva2n9wkrb$.1b0qy1961jao6.dlg@40tude.net>
In reply to#7645
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.

[toc] | [prev] | [next] | [standalone]


#7655

Fromfir <profesor.fir@gmail.com>
Date2017-03-28 00:43 -0700
Message-ID<d5669dca-5d49-412b-adbe-730cdac40de3@googlegroups.com>
In reply to#7654
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

[toc] | [prev] | [next] | [standalone]


#7656

Fromfir <profesor.fir@gmail.com>
Date2017-03-28 01:02 -0700
Message-ID<e5be9135-c189-4b04-9bf8-3248ac954e59@googlegroups.com>
In reply to#7655
W dniu wtorek, 28 marca 2017 09:43:48 UTC+2 użytkownik fir napisał:
> 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

i tried indexing of blocks o2 2x2 pixels and get reduction from 12 MB -> 2 MB (on this bitmap zip gives 800 KB)

will try yet simple RLE and check if its better

[toc] | [prev] | [next] | [standalone]


#7663

FromEd Prochak <edprochak@gmail.com>
Date2017-03-28 10:26 -0700
Message-ID<83b023c0-2a8f-4802-9337-1dff9f2e73d9@googlegroups.com>
In reply to#7645
On Monday, March 27, 2017 at 12:13:33 PM UTC-4, 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 
[]
> 
> 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) 
> 

[]
> 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?

Why don't you check out open sources for algorithms like
jpeg compression? Sure you did not write it, but it is
sometimes very helpful to learn from someone else's code.

ed

[toc] | [prev] | [next] | [standalone]


#7665

Fromfir <profesor.fir@gmail.com>
Date2017-03-28 12:19 -0700
Message-ID<0e9404d0-e8f0-4f6b-9a77-9f715a2b0838@googlegroups.com>
In reply to#7663
W dniu wtorek, 28 marca 2017 19:26:35 UTC+2 użytkownik Ed Prochak napisał:
> On Monday, March 27, 2017 at 12:13:33 PM UTC-4, 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 
> []
> > 
> > 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) 
> > 
> 
> []
> > 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?
> 
> Why don't you check out open sources for algorithms like
> jpeg compression? Sure you did not write it, but it is
> sometimes very helpful to learn from someone else's code.
> 
> ed

i suspect it would be to hard - (i dont wanna spend month on this topic only few spare hours maybe)

- what i do now mostly satisfies me, meybe yet i will try this RLE encoding
(i just written simple RLE for strings (not tested but maybe work)

int CheckHowLongRepeatingSequenceHere(unsigned char* input, unsigned char*input_last)
{
  int counter = 0;

  for(unsigned char* p = input; p<=input_last; p++)
  {
     if(*p==*input) counter++;
     else break;
  }
  return counter;
}

int EncodeRLE(unsigned char* input, int input_max, unsigned char* output, int output_max)
{

   int input_i = 0;
  int output_i = 0;

 for(;;)
 {
  if(input[input_i] & 0x80)   ERROR_("error:  7 bit input values are assumed");
  if( input_i>=input_max) return output_i;
  if(output_i>=output_max)    ERROR_("error:  overflow in output (in EncodeRLE)");

  int rep = CheckHowLongRepeatingSequenceHere(&input[input_i], &input[input_max-1]);

  if(rep==1)
  {
    output[output_i] = input[input_i];

     input_i ++;
    output_i ++;

  }

  if(rep>255)
    ERROR_("rep > 255 not implemented (by lazyness)");

  if(rep > 1)
  {
    output[output_i] = input[input_i] & 0x80000000;
    output_i++;
    output[output_i] = rep;
    output_i++;

    input_i += rep;
  }

 }

}

later i will maybe turn it to encode pixel stream

[toc] | [prev] | [next] | [standalone]


#7666

Fromfir <profesor.fir@gmail.com>
Date2017-03-28 12:25 -0700
Message-ID<a1f33c8e-48b7-43b4-b1c2-497c80ccff00@googlegroups.com>
In reply to#7665
W dniu wtorek, 28 marca 2017 21:19:27 UTC+2 użytkownik fir napisał:
> W dniu wtorek, 28 marca 2017 19:26:35 UTC+2 użytkownik Ed Prochak napisał:
> > On Monday, March 27, 2017 at 12:13:33 PM UTC-4, 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 
> > []
> > > 
> > > 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) 
> > > 
> > 
> > []
> > > 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?
> > 
> > Why don't you check out open sources for algorithms like
> > jpeg compression? Sure you did not write it, but it is
> > sometimes very helpful to learn from someone else's code.
> > 
> > ed
> 
> i suspect it would be to hard - (i dont wanna spend month on this topic only few spare hours maybe)
> 

as to jpg anyway this is good idea, i checked how big
loseless jpg would be (i assume 100% jpg quality in ifranview is looseless) -> it made 2.9 MB jpg it is it seems quite worse than simple primitive indexing.. seems jpg does not go to much well in loosles compression (or im wrong somewhere)



> - what i do now mostly satisfies me, meybe yet i will try this RLE encoding
> (i just written simple RLE for strings (not tested but maybe work)
> 
> int CheckHowLongRepeatingSequenceHere(unsigned char* input, unsigned char*input_last)
> {
>   int counter = 0;
> 
>   for(unsigned char* p = input; p<=input_last; p++)
>   {
>      if(*p==*input) counter++;
>      else break;
>   }
>   return counter;
> }
> 
> int EncodeRLE(unsigned char* input, int input_max, unsigned char* output, int output_max)
> {
> 
>    int input_i = 0;
>   int output_i = 0;
> 
>  for(;;)
>  {
>   if(input[input_i] & 0x80)   ERROR_("error:  7 bit input values are assumed");
>   if( input_i>=input_max) return output_i;
>   if(output_i>=output_max)    ERROR_("error:  overflow in output (in EncodeRLE)");
> 
>   int rep = CheckHowLongRepeatingSequenceHere(&input[input_i], &input[input_max-1]);
> 
>   if(rep==1)
>   {
>     output[output_i] = input[input_i];
> 
>      input_i ++;
>     output_i ++;
> 
>   }
> 
>   if(rep>255)
>     ERROR_("rep > 255 not implemented (by lazyness)");
> 
>   if(rep > 1)
>   {
>     output[output_i] = input[input_i] & 0x80000000;
>     output_i++;
>     output[output_i] = rep;
>     output_i++;
> 
>     input_i += rep;
>   }
> 
>  }
> 
> }
> 
> later i will maybe turn it to encode pixel stream

[toc] | [prev] | [next] | [standalone]


#7667

Fromfir <profesor.fir@gmail.com>
Date2017-03-28 12:33 -0700
Message-ID<3aad7648-15d0-4ce9-9af5-b526da9d9c11@googlegroups.com>
In reply to#7666
W dniu wtorek, 28 marca 2017 21:26:00 UTC+2 użytkownik fir napisał:
> W dniu wtorek, 28 marca 2017 21:19:27 UTC+2 użytkownik fir napisał:
> > W dniu wtorek, 28 marca 2017 19:26:35 UTC+2 użytkownik Ed Prochak napisał:
> > > On Monday, March 27, 2017 at 12:13:33 PM UTC-4, 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 
> > > []
> > > > 
> > > > 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) 
> > > > 
> > > 
> > > []
> > > > 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?
> > > 
> > > Why don't you check out open sources for algorithms like
> > > jpeg compression? Sure you did not write it, but it is
> > > sometimes very helpful to learn from someone else's code.
> > > 
> > > ed
> > 
> > i suspect it would be to hard - (i dont wanna spend month on this topic only few spare hours maybe)
> > 
> 
> as to jpg anyway this is good idea, i checked how big
> loseless jpg would be (i assume 100% jpg quality in ifranview is looseless) -> it made 2.9 MB jpg it is it seems quite worse than simple primitive indexing.. seems jpg does not go to much well in loosles compression (or im wrong somewhere)
> 
png gave 1.5 MB (at best compression at least it gave 12 MB) and gif gave 666KB (hope it is looselees at sight it looks like looseless)

[toc] | [prev] | [next] | [standalone]


#7676

FromEd Prochak <edprochak@gmail.com>
Date2017-03-30 13:40 -0700
Message-ID<a77c152f-8437-4586-8de4-b1d9e07befc6@googlegroups.com>
In reply to#7666
On Tuesday, March 28, 2017 at 3:26:00 PM UTC-4, fir wrote:
> W dniu wtorek, 28 marca 2017 21:19:27 UTC+2 użytkownik fir napisał:
> > W dniu wtorek, 28 marca 2017 19:26:35 UTC+2 użytkownik Ed Prochak napisał:
> > > On Monday, March 27, 2017 at 12:13:33 PM UTC-4, 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 
> > > []
> > > > 
> > > > 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) 
> > > > 
> > > 
> > > []
> > > > 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?
> > > 
> > > Why don't you check out open sources for algorithms like
> > > jpeg compression? Sure you did not write it, but it is
> > > sometimes very helpful to learn from someone else's code.
> > > 
> > > ed
> > 
> > i suspect it would be to hard - (i dont wanna spend month on this topic only few spare hours maybe)
> > 
> 
> as to jpg anyway this is good idea, i checked how big
> loseless jpg would be (i assume 100% jpg quality
> in ifranview is looseless) -> it made 2.9 MB jpg
> it is it seems quite worse than simple primitive
> indexing.. seems jpg does not go to much well in
> loosles compression (or im wrong somewhere)
> 
> 
Earlier you said:
"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 you say lossless jpeg with the same ratio (2.9/12~1/4)
is somehow worse.

Okay, I tried to help and you did look.
Good luck.
  ed

[toc] | [prev] | [next] | [standalone]


#7677

Fromfir <profesor.fir@gmail.com>
Date2017-03-30 13:50 -0700
Message-ID<9e943d01-bc80-48de-bfbe-a5a264e8e668@googlegroups.com>
In reply to#7676
W dniu czwartek, 30 marca 2017 22:40:22 UTC+2 użytkownik Ed Prochak napisał:
> On Tuesday, March 28, 2017 at 3:26:00 PM UTC-4, fir wrote:
> > W dniu wtorek, 28 marca 2017 21:19:27 UTC+2 użytkownik fir napisał:
> > > W dniu wtorek, 28 marca 2017 19:26:35 UTC+2 użytkownik Ed Prochak napisał:
> > > > On Monday, March 27, 2017 at 12:13:33 PM UTC-4, 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 
> > > > []
> > > > > 
> > > > > 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) 
> > > > > 
> > > > 
> > > > []
> > > > > 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?
> > > > 
> > > > Why don't you check out open sources for algorithms like
> > > > jpeg compression? Sure you did not write it, but it is
> > > > sometimes very helpful to learn from someone else's code.
> > > > 
> > > > ed
> > > 
> > > i suspect it would be to hard - (i dont wanna spend month on this topic only few spare hours maybe)
> > > 
> > 
> > as to jpg anyway this is good idea, i checked how big
> > loseless jpg would be (i assume 100% jpg quality
> > in ifranview is looseless) -> it made 2.9 MB jpg
> > it is it seems quite worse than simple primitive
> > indexing.. seems jpg does not go to much well in
> > loosles compression (or im wrong somewhere)
> > 
> > 
> Earlier you said:
> "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 you say lossless jpeg with the same ratio (2.9/12~1/4)
> is somehow worse.
> 
> Okay, I tried to help and you did look.
> Good luck.
>   ed

you seem to be idiot, dont you? you like to waste people time as idiots do, dont you? you should maybe use a bit of brain before and know that when i was sayin here about 
indexing results were better than 2.9 MB (like when indexing 4 pixels at once).. read and stop playin idiot who gives idiot advices where not understanding the basic points, idiots are not welcome

 

[toc] | [prev] | [next] | [standalone]


#7678

Fromfir <profesor.fir@gmail.com>
Date2017-03-30 13:54 -0700
Message-ID<07c28cb3-9212-4ea8-9cfa-b5ff4e473614@googlegroups.com>
In reply to#7677
W dniu czwartek, 30 marca 2017 22:50:14 UTC+2 użytkownik fir napisał:
> W dniu czwartek, 30 marca 2017 22:40:22 UTC+2 użytkownik Ed Prochak napisał:
> > On Tuesday, March 28, 2017 at 3:26:00 PM UTC-4, fir wrote:
> > > W dniu wtorek, 28 marca 2017 21:19:27 UTC+2 użytkownik fir napisał:
> > > > W dniu wtorek, 28 marca 2017 19:26:35 UTC+2 użytkownik Ed Prochak napisał:
> > > > > On Monday, March 27, 2017 at 12:13:33 PM UTC-4, 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 
> > > > > []
> > > > > > 
> > > > > > 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) 
> > > > > > 
> > > > > 
> > > > > []
> > > > > > 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?
> > > > > 
> > > > > Why don't you check out open sources for algorithms like
> > > > > jpeg compression? Sure you did not write it, but it is
> > > > > sometimes very helpful to learn from someone else's code.
> > > > > 
> > > > > ed
> > > > 
> > > > i suspect it would be to hard - (i dont wanna spend month on this topic only few spare hours maybe)
> > > > 
> > > 
> > > as to jpg anyway this is good idea, i checked how big
> > > loseless jpg would be (i assume 100% jpg quality
> > > in ifranview is looseless) -> it made 2.9 MB jpg
> > > it is it seems quite worse than simple primitive
> > > indexing.. seems jpg does not go to much well in
> > > loosles compression (or im wrong somewhere)
> > > 
> > > 
> > Earlier you said:
> > "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 you say lossless jpeg with the same ratio (2.9/12~1/4)
> > is somehow worse.
> > 
> > Okay, I tried to help and you did look.
> > Good luck.
> >   ed
> 
> you seem to be idiot, dont you? you like to waste people time as idiots do, dont you? you should maybe use a bit of brain before and know that when i was sayin here about 
> indexing results were better than 2.9 MB (like when indexing 4 pixels at once).. read and stop playin idiot who gives idiot advices where not understanding the basic points, idiots are not welcome

ps i normallu used a word idiots for people that are genarally disabled but also here seeing such stupid comments also makes me a bit 'uneasy', idiots please stay out

[toc] | [prev] | [next] | [standalone]


#7679

Fromfir <profesor.fir@gmail.com>
Date2017-03-30 15:10 -0700
Message-ID<519a954a-2145-4adc-bf87-a2a1b0b40591@googlegroups.com>
In reply to#7678
W dniu czwartek, 30 marca 2017 22:54:38 UTC+2 użytkownik fir napisał:
> W dniu czwartek, 30 marca 2017 22:50:14 UTC+2 użytkownik fir napisał:
> > W dniu czwartek, 30 marca 2017 22:40:22 UTC+2 użytkownik Ed Prochak napisał:
> > > On Tuesday, March 28, 2017 at 3:26:00 PM UTC-4, fir wrote:
> > > > W dniu wtorek, 28 marca 2017 21:19:27 UTC+2 użytkownik fir napisał:
> > > > > W dniu wtorek, 28 marca 2017 19:26:35 UTC+2 użytkownik Ed Prochak napisał:
> > > > > > On Monday, March 27, 2017 at 12:13:33 PM UTC-4, 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 
> > > > > > []
> > > > > > > 
> > > > > > > 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) 
> > > > > > > 
> > > > > > 
> > > > > > []
> > > > > > > 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?
> > > > > > 
> > > > > > Why don't you check out open sources for algorithms like
> > > > > > jpeg compression? Sure you did not write it, but it is
> > > > > > sometimes very helpful to learn from someone else's code.
> > > > > > 
> > > > > > ed
> > > > > 
> > > > > i suspect it would be to hard - (i dont wanna spend month on this topic only few spare hours maybe)
> > > > > 
> > > > 
> > > > as to jpg anyway this is good idea, i checked how big
> > > > loseless jpg would be (i assume 100% jpg quality
> > > > in ifranview is looseless) -> it made 2.9 MB jpg
> > > > it is it seems quite worse than simple primitive
> > > > indexing.. seems jpg does not go to much well in
> > > > loosles compression (or im wrong somewhere)
> > > > 
> > > > 
> > > Earlier you said:
> > > "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 you say lossless jpeg with the same ratio (2.9/12~1/4)
> > > is somehow worse.
> > > 
> > > Okay, I tried to help and you did look.
> > > Good luck.
> > >   ed
> > 
> > you seem to be idiot, dont you? you like to waste people time as idiots do, dont you? you should maybe use a bit of brain before and know that when i was sayin here about 
> > indexing results were better than 2.9 MB (like when indexing 4 pixels at once).. read and stop playin idiot who gives idiot advices where not understanding the basic points, idiots are not welcome
> 
> ps i normallu used a word idiots for people that are genarally disabled but also here seeing such stupid comments also makes me a bit 'uneasy', idiots please stay out

sorry if im over angry (sometimes probably i am), but  bulshit is anyway wrong thing so someties it is better to state antibulshit things clearly, yawn

[toc] | [prev] | [next] | [standalone]


#7687

FromEd Prochak <edprochak@gmail.com>
Date2017-04-03 07:11 -0700
Message-ID<6d77e704-154a-4591-844e-c6a27128730f@googlegroups.com>
In reply to#7677
On Thursday, March 30, 2017 at 4:50:14 PM UTC-4, fir wrote:
> W dniu czwartek, 30 marca 2017 22:40:22 UTC+2 użytkownik Ed Prochak napisał:
> > On Tuesday, March 28, 2017 at 3:26:00 PM UTC-4, fir wrote:
> > > W dniu wtorek, 28 marca 2017 21:19:27 UTC+2 użytkownik fir napisał:
> > > > W dniu wtorek, 28 marca 2017 19:26:35 UTC+2 użytkownik Ed Prochak napisał:
> > > > > On Monday, March 27, 2017 at 12:13:33 PM UTC-4, 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 
> > > > > []
> > > > > > 
> > > > > > 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) 
> > > > > > 
> > > > > 
> > > > > []
> > > > > > 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?
> > > > > 
> > > > > Why don't you check out open sources for algorithms like
> > > > > jpeg compression? Sure you did not write it, but it is
> > > > > sometimes very helpful to learn from someone else's code.
> > > > > 
> > > > > ed
> > > > 
> > > > i suspect it would be to hard - (i dont wanna spend month on this topic only few spare hours maybe)
> > > > 
> > > 
> > > as to jpg anyway this is good idea, i checked how big
> > > loseless jpg would be (i assume 100% jpg quality
> > > in ifranview is looseless) -> it made 2.9 MB jpg
> > > it is it seems quite worse than simple primitive
> > > indexing.. seems jpg does not go to much well in
> > > loosles compression (or im wrong somewhere)
> > > 
> > > 
> > Earlier you said:
> > "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 you say lossless jpeg with the same ratio (2.9/12~1/4)
> > is somehow worse.
> > 
> > Okay, I tried to help and you did look.
> > Good luck.
> >   ed
> 
> you seem to be idiot, dont you? you like to waste
> people time as idiots do, dont you? you should maybe
> use a bit of brain before and know that when i was
> sayin here about indexing results were better than
> 2.9 MB (like when indexing 4 pixels at once).. read
> and stop playin idiot who gives idiot advices where
> not understanding the basic points, idiots are not welcome

I don't know where your anger came from. I just made a simple
observation. I noted that you did check out my advice and
dismissed it for your purposes. I take no offence in that.

Anyway, like I said, Good luck with you project.
ed

[toc] | [prev] | [next] | [standalone]


#7688

Fromfir <profesor.fir@gmail.com>
Date2017-04-03 08:20 -0700
Message-ID<68158533-5513-45dd-b9bc-d05604856831@googlegroups.com>
In reply to#7687
W dniu poniedziałek, 3 kwietnia 2017 16:11:12 UTC+2 użytkownik Ed Prochak napisał:
> On Thursday, March 30, 2017 at 4:50:14 PM UTC-4, fir wrote:
> > W dniu czwartek, 30 marca 2017 22:40:22 UTC+2 użytkownik Ed Prochak napisał:
> > > On Tuesday, March 28, 2017 at 3:26:00 PM UTC-4, fir wrote:
> > > > W dniu wtorek, 28 marca 2017 21:19:27 UTC+2 użytkownik fir napisał:
> > > > > W dniu wtorek, 28 marca 2017 19:26:35 UTC+2 użytkownik Ed Prochak napisał:
> > > > > > On Monday, March 27, 2017 at 12:13:33 PM UTC-4, 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 
> > > > > > []
> > > > > > > 
> > > > > > > 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) 
> > > > > > > 
> > > > > > 
> > > > > > []
> > > > > > > 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?
> > > > > > 
> > > > > > Why don't you check out open sources for algorithms like
> > > > > > jpeg compression? Sure you did not write it, but it is
> > > > > > sometimes very helpful to learn from someone else's code.
> > > > > > 
> > > > > > ed
> > > > > 
> > > > > i suspect it would be to hard - (i dont wanna spend month on this topic only few spare hours maybe)
> > > > > 
> > > > 
> > > > as to jpg anyway this is good idea, i checked how big
> > > > loseless jpg would be (i assume 100% jpg quality
> > > > in ifranview is looseless) -> it made 2.9 MB jpg
> > > > it is it seems quite worse than simple primitive
> > > > indexing.. seems jpg does not go to much well in
> > > > loosles compression (or im wrong somewhere)
> > > > 
> > > > 
> > > Earlier you said:
> > > "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 you say lossless jpeg with the same ratio (2.9/12~1/4)
> > > is somehow worse.
> > > 
> > > Okay, I tried to help and you did look.
> > > Good luck.
> > >   ed
> > 
> > you seem to be idiot, dont you? you like to waste
> > people time as idiots do, dont you? you should maybe
> > use a bit of brain before and know that when i was
> > sayin here about indexing results were better than
> > 2.9 MB (like when indexing 4 pixels at once).. read
> > and stop playin idiot who gives idiot advices where
> > not understanding the basic points, idiots are not welcome
> 
> I don't know where your anger came from. I just made a simple
> observation. I noted that you did check out my advice and
> dismissed it for your purposes. I take no offence in that.
> 
> Anyway, like I said, Good luck with you project.
> ed

well, im sorry (i felt for a while like being over angry)
it comes from the basic source i really hate if some
do not understand the topic and then says some weak bulshit as an advice (yet sometimes morons use mouth
to emphasize this bullshit, it gets me really angry) 

here it was just from: jpg gives 2.9 MB which is terrible, as simple indexing of 4-pix gives about 2 MB
(or a bit above)and this was written above clearly so dont state thiose bulshits like "Yet you say lossless jpeg with the same ratio (2.9/12~1/4) is somehow worse. " 1-pix indexing is a bit worse but 4-pix is better - understood it and not produce b*shits, b*shits are not helpfull and gets people angry (i think all who dont like bulshit can get angry in such kind of totally worthless remarks, ) Though im sorry as i get somewhat angry too much sometimes ;c

[toc] | [prev] | [next] | [standalone]


#7668

FromRobert Wessel <robertwessel2@yahoo.com>
Date2017-03-28 16:40 -0500
Message-ID<2ulldcliq96se346fpqks8osqrs91u51u0@4ax.com>
In reply to#7663
On Tue, 28 Mar 2017 10:26:33 -0700 (PDT), Ed Prochak
<edprochak@gmail.com> wrote:

>On Monday, March 27, 2017 at 12:13:33 PM UTC-4, 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 
>[]
>> 
>> 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) 
>> 
>
>[]
>> 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?
>
>Why don't you check out open sources for algorithms like
>jpeg compression? Sure you did not write it, but it is
>sometimes very helpful to learn from someone else's code.


The reference code for libpng has a very permissive license, as does
the required zlib.  And you can trivially test how well those will
work by opening the bitmap in your favorite image editor and saving it
as a PNG.

[toc] | [prev] | [next] | [standalone]


#7669

Fromfir <profesor.fir@gmail.com>
Date2017-03-28 15:19 -0700
Message-ID<3a8c88ea-e7c3-4af9-9f84-515eafe08751@googlegroups.com>
In reply to#7668
W dniu wtorek, 28 marca 2017 23:39:35 UTC+2 użytkownik robert...@yahoo.com napisał:
> On Tue, 28 Mar 2017 10:26:33 -0700 (PDT), Ed Prochak
> <edprochak@gmail.com> wrote:
> 
> >On Monday, March 27, 2017 at 12:13:33 PM UTC-4, 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 
> >[]
> >> 
> >> 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) 
> >> 
> >
> >[]
> >> 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?
> >
> >Why don't you check out open sources for algorithms like
> >jpeg compression? Sure you did not write it, but it is
> >sometimes very helpful to learn from someone else's code.
> 
> 
> The reference code for libpng has a very permissive license, as does
> the required zlib.  And you can trivially test how well those will
> work by opening the bitmap in your favorite image editor and saving it
> as a PNG.

dont you see i wrote on this post above? gif works 
well png not so much, jpg quite bad

[toc] | [prev] | [standalone]


Back to top | Article view | comp.programming


csiph-web