Author Topic: Bitmap compression  (Read 2413 times)

0 Members and 1 Guest are viewing this topic.

Offline kindermoumoute

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 836
  • Rating: +54/-3
    • View Profile
Bitmap compression
« on: March 10, 2012, 07:21:27 pm »
Plop,
I want to compress my bitmap (monochrom) 256*256 pixels (8192 bytes). I tried to make my own rle compression in this way : the first bit to determinate state (1 = pixel on, 0 = pixel off) then 7 bits are used to indicate number of pixels to fill with this value.
eg. this code :
Code: [Select]
[FFFFFFFFFFFFFFFF0000]Should be :
Code: [Select]
[C010]
Here my code, it leave program without reason. That's probably due to a corrupted RAM (each time it display ARC>7500Ko :w00t:).
Spoiler For Spoiler:
Quote from: Axe
.LMBD
"|vMAPTEMP"Str1
L3+768^^oEND
ClrDrawr
Return!If GetCalc(Str1)
+2A
{A}[e]0*128{L3}
L3C
1I
While I
While OPT1()
OPT2()
End
C++
0{C}
Repeat OPT1()
OPT2()
End
C++
128{C}
End
Disp length(L3)>Dec
Repeat getKey(9)
End
Return

Lbl OPT2
!If C-^^oEND
Disp "L3 DEPASSE
Pause 2000
Returnr
End
{C}+1^128?{C}++,C++
I++
Return

Lbl OPT1
/8+A[e]I
Return

Generated by the BBify'r (http://clrhome.org/resources/bbify/)
Projects :

Worms armageddon z80 :
- smoothscrolling Pixelmapping : 100%
- Map editor : 80%
- Game System : 0%

Tutoriel français sur l'Axe Parser
- 1ère partie : en ligne.
- 2ème partie : en ligne.
- 3ème partie : en ligne.
- 4ème partie : 10%
- Annexe : 100%