Subversion Repositories Kolibri OS

Rev

Rev 180 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
180 heavyiron 1
;**************************************************************************
2
;**********************DECODING BMP FILE(1,4,8,24 bits)*********************
3
;***************************************************************************
4
; BMPTOIMG -Convert BMP format TO IMG format
5
;***************************************************************************
6
bmptoimg:
7
 
8
    mov [bmp_load_area],esi
9
    mov [img_dest_area],edi
10
    xor eax,eax
11
    mov ax,word[esi+28]
12
    mov ebx,[esi+14]
13
    mov ecx,[esi+18]
14
    mov edx,[esi+22]
15
    mov [bmp_bits_per_pixel],ax
16
    mov [bmp_first_structure_size],ebx
17
    mov [Bmp_SizeY],edx
18
    mov [Bmp_SizeX],ecx
19
 
20
    xor eax,eax
21
    mov ax,[esi+28]
22
    mul  dword [esi+18]
23
    add  eax,31
24
    shr  eax,5
25
    mov  dword [bmptoimg_data_area_dwps],eax  ;dwps-doublewords per string
26
    shl  eax,2
27
    mov  dword [bmptoimg_data_area_bps],eax   ;bps-bytes per string
28
 
29
    cmp dword [esi+34],0
30
    jne  yespicsize  ;if picture size is defined
31
    mul dword [esi+22]
32
    mov dword [esi+34],eax
33
 
34
  yespicsize:
35
 
36
    mov  eax,[bmp_load_area]
37
    add  eax, [esi+10]	 ;how mach bytes to begin bitmap
38
    add  eax, [esi+34]	 ;size of bitmap in BMP file
39
    mov  dword [bmptoimg_data_area_eop],eax   ;eop-end of picture in file
40
    ;calculate bytes per string
41
    mov  eax, [esi+18]
42
    lea  eax,[eax+2*eax]   ;3x pixels in eax
43
    mov [bmp_bytes_per_string],eax
44
 
45
    mov esi,dword [bmptoimg_data_area_eop]
46
    sub esi,dword [bmptoimg_data_area_bps]
47
 
48
    mov ebp,[img_dest_area]
49
    mov edi,[img_dest_area]
50
    mov ebx,[bmp_load_area]
51
    add ebx, [bmp_first_structure_size]
52
    add ebx,14		;in ebx start of color table
53
 
54
 
55
    cmp [bmp_bits_per_pixel],24
56
    je	convert_to_24bpp
57
 
58
    cmp [bmp_bits_per_pixel],8
59
    je convert_to_8bpp
60
 
61
    cmp [bmp_bits_per_pixel],4
62
    je convert_to_4bpp
63
 
64
    cmp [bmp_bits_per_pixel],1
65
    je convert_to_1bpp
66
 
67
    jmp end_bmp
68
 
69
;--------------------------------------------------
70
;-----------Decoding 24 bit BMP file---------------
71
;--------------------------------------------------
72
convert_to_24bpp:
73
 
74
  mov ebx,[Bmp_SizeY]
75
  loop_convert_to_24bpp_y:
76
 
77
    mov edi,ebp
78
    mov  ecx,[bmptoimg_data_area_dwps]
79
 
6327 IgorA 80
     cld
81
     rep movsd
180 heavyiron 82
 
83
    sub  esi,[bmptoimg_data_area_bps]
84
    sub  esi,[bmptoimg_data_area_bps]
85
 
86
    add  ebp,eax
87
    dec ebx
88
    jnz loop_convert_to_24bpp_y
89
 
90
    jmp  end_bmp
91
;-----------------------------------------------------
92
;--------------Decoding 8 bits BMP file---------------
93
;-----------------------------------------------------
94
 convert_to_8bpp:
95
 
96
    mov ebp,[Bmp_SizeY]
97
    loop_convert_8bpp_y:
98
 
99
      mov ecx,[bmptoimg_data_area_bps]
100
      push edi
101
 
102
      loop_convert_8bpp_x:
103
 
104
	 xor eax,eax
105
	 mov al,byte [esi]
106
	 call converttable
107
	 inc esi
108
	 add edi,3
109
 
110
      dec ecx
111
      jnz loop_convert_8bpp_x
112
 
113
      pop edi
114
 
115
    add edi,[bmp_bytes_per_string]
116
    sub esi,[bmptoimg_data_area_bps]
117
    sub esi,[bmptoimg_data_area_bps]
118
 
119
    dec ebp
120
    jnz loop_convert_8bpp_y
121
 
122
    jmp end_bmp
123
;-----------------------------------------------------
124
;--------------Decoding 4 bits BMP file---------------
125
;-----------------------------------------------------
126
 convert_to_4bpp:
127
 
128
    mov ebp,[Bmp_SizeY]
129
    loop_convert_4bpp_y:
130
 
131
      mov ecx,[bmptoimg_data_area_bps]
132
      push edi
133
 
134
      loop_convert_4bpp_x:
135
 
136
	 mov [Bmp_save1],ecx
137
	 xor eax,eax
138
	 mov al,byte [esi]
139
	 xor ecx,ecx
140
	 mov cl,al
141
	 shr al,4   ;first pixel in byte
142
	 and cl,0xf ;second pixel in byte
143
	 call converttable   ;draw first pixel of byte
144
	 mov eax,ecx	       ;move second pixel to register al and draw
145
	 add edi,3
146
	 call converttable   ;draw second pixel of byte
147
	 add edi,3
148
	 mov ecx,[Bmp_save1]
149
	 inc esi
150
 
151
      dec ecx
152
      jnz loop_convert_4bpp_x
153
 
154
      pop edi
155
 
156
    add edi,[bmp_bytes_per_string]
157
    sub esi,[bmptoimg_data_area_bps]
158
    sub esi,[bmptoimg_data_area_bps]
159
 
160
    dec ebp
161
    jnz loop_convert_4bpp_y
162
 
163
    jmp end_bmp
164
;-----------------------------------------------------
165
;---------------Decoding 1 bit BMP file---------------
166
;-----------------------------------------------------
167
 convert_to_1bpp:
168
 
169
    mov ebp,[Bmp_SizeY]
170
    loop_convert_1bpp_y:
171
 
172
      mov ecx,[bmptoimg_data_area_bps]
173
      push edi
174
 
175
      loop_convert_1bpp_x:
176
 
177
	 xor eax,eax
178
	 mov al,byte [esi]
179
	 mov [Bmp_save1],ecx
180
	 mov  ecx,eax
181
	 mov  edx,7
182
	 nextbit:
183
	    xor  eax,eax
184
	    bt	 ecx,edx
185
	    jnc  noaddelem
186
	    inc  eax
187
	    noaddelem:
188
 
189
	    push edx
190
	    call converttable
191
	    pop  edx
192
 
193
	    add  edi,3
194
	    dec  edx
195
	 jns nextbit
196
	 mov ecx,[Bmp_save1]
197
	 inc esi
198
      dec ecx
199
      jnz loop_convert_1bpp_x
200
 
201
      pop edi
202
 
203
    add edi,[bmp_bytes_per_string]
204
    sub esi,[bmptoimg_data_area_bps]
205
    sub esi,[bmptoimg_data_area_bps]
206
 
207
    dec ebp
208
    jnz loop_convert_1bpp_y
209
 
210
    jmp end_bmp
211
;-----------------------------------------------------
212
  converttable:
213
    shl  eax,2
214
    add  eax,ebx
215
    mov  edx, dword [eax]
216
    mov [edi],edx
217
    ret
218
;-----------------------------------------------------
219
; DATA AREA
220
bmptoimg_data_area_bps	    dd 0
221
bmptoimg_data_area_dwps     dd 0
222
bmptoimg_data_area_eop	    dd 0
223
bmp_load_area		    dd 0
224
img_dest_area		    dd 0
225
bmp_bits_per_pixel	    dw 0
226
bmp_first_structure_size    dd 0
227
bmp_bytes_per_string	    dd 0
228
 
229
end_bmp:
230
 
231
ret
232
 
233
;***************************************************************************
234
;*******************CODING BMP FILE(1,4,8,24 bits)**************************
235
;***************************************************************************
236
 
237
;-------------------------autor andrew_programmer---------------------------
238
 
239
coding_bmp:
240
 
241
	 mov [PointerToImage],ebx
242
	 mov [WhereCodingBMP],ecx
243
	 mov [BmpPalette],edx
244
	 mov [Bmp_SizeX],esi
245
	 mov [Bmp_SizeY],edi
246
	 ;**********************************************
247
	 ;******************1 bit BMP*******************
248
	 ;**********************************************
249
	 cmp eax,2
250
	 ja no_monohrom_colors
251
	 mov esi,[BmpPalette]
252
	 mov edi,[WhereCodingBMP]
253
	 add edi,54
254
	 mov eax,[esi]	 ;first color
255
	 mov ebx,[esi+4] ;second color
256
	 mov [edi],eax
257
	 mov [edi+4],ebx
258
 
259
	 ;coding image to bmp 1 bit format
260
	 mov esi,[PointerToImage]
261
	 mov edx,[WhereCodingBMP]
262
	 mov ebx,[Bmp_SizeX]
263
	 add ebx,31		   ;picture_size_x+31
264
	 shr ebx,5		   ;((picture_size_x)+31)/32
265
	 mov [Bmp_doublewords],ebx ;double words in string
266
	 shl ebx,2
267
	 mov [Bmp_bytes_per_string],ebx ;bytes per string
268
	 mov ecx,[Bmp_SizeY]
269
	 dec ecx
270
	 imul ebx,ecx
271
	 add edx,54+8
272
	 add edx,ebx		    ;in edx pointer to area for coding
273
 
274
	 mov ebp,[Bmp_bytes_per_string]
275
 
276
	 mov ebx,[Bmp_SizeY]
277
	 mov esi,[PointerToImage]
278
	 mov edi,edx
279
 
280
	 mov edx,[Bmp_SizeX]
281
	 lea edx,[edx+edx*2]
282
 
283
	 mov [Bmp_Counter],7
284
	 and [Bmp_Counter2],0
285
	 copy_lines_1:
286
 
287
	   push esi
288
	   mov ecx,[Bmp_bytes_per_string]
289
	   shl ecx,3	      ;(Bmp_bytes_per_string)*8
290
 
291
	   rep_movsb_1:
292
 
293
	      mov eax,[esi]
294
	      and eax,0xffffff
295
	      push esi
296
	      push ecx
297
	      push ebx
298
	      mov esi,[BmpPalette]
299
	      xor ecx,ecx
300
		find_color_in_palette_1:
301
		   mov ebx,[esi]
302
		   and ebx,0xffffff
303
		   cmp eax,ebx		 ;color fined ?
304
		   je color_fined_1
305
		   add esi,4
306
		   inc ecx
307
		   cmp ecx,256
308
		   jl find_color_in_palette_1
309
		   color_fined_1:
310
	      mov [Bmp_Counter3],ecx	 ;number color in palette
311
	      pop ebx
312
	      pop ecx
313
	      pop esi
314
	      mov eax,[Bmp_Counter3]
315
 
316
	      test eax,eax
317
	      jz no_change_bit_in_byte
318
 
319
	      push ecx
320
	      mov ecx,[Bmp_Counter]
321
	      bts [Bmp_Counter2],ecx
322
	      pop ecx
323
 
324
	      no_change_bit_in_byte:
325
 
326
	      dec [Bmp_Counter]
327
	      jns no_minus_in_counter
328
 
329
	      push eax
330
	      mov eax,[Bmp_Counter2]
331
	      mov [edi],al
332
	      inc edi
333
	      mov [Bmp_Counter],7
334
	      and [Bmp_Counter2],0     ;obnulyaem byte
335
	      pop eax
336
 
337
	      no_minus_in_counter:
338
 
339
	      add esi,3
340
	   dec ecx
341
	   jnz rep_movsb_1
342
	   pop esi
343
 
344
	 add esi,edx
345
	 sub edi,ebp
346
	 sub edi,ebp
347
 
348
	 dec ebx
349
	 jnz copy_lines_1
350
 
351
	 mov edi,[WhereCodingBMP]
352
	 mov ebx,[Bmp_bytes_per_string]
353
	 imul ebx,[Bmp_SizeY]
354
	 add ebx,(54+8)
355
 
356
	 ;crate list of bmp description
357
	 mov [edi],word 'BM'
358
	 mov [edi+2],ebx
359
	 mov [edi+10],dword 54+8 ;where bigin bmp imige
360
	 mov [edi+14],dword 40
361
	 mov edx,[Bmp_SizeX]
362
	 mov ecx,[Bmp_SizeY]
363
	 mov [edi+18],edx    ;picture size x
364
	 mov [edi+22],ecx    ;picture size y
365
	 mov [edi+26],word 1
366
	 mov [edi+28],word 1 ;bits per pixel
367
	 mov [edi+30],dword 0
368
	 mov edx,[Bmp_bytes_per_string]
369
	 imul edx,ecx
370
	 mov [edi+34],edx
371
	 mov [edi+38],dword 0
372
	 mov [edi+42],dword 0
373
	 mov [edi+46],dword 0
374
 
375
	 ret
376
 
377
	 no_monohrom_colors:
378
 
379
	 ;**********************************************
380
	 ;*****************4 bits BMP*******************
381
	 ;**********************************************
382
	 cmp eax,16
383
	 ja no_16_colors
384
	 ;copy 16 colors palette
385
	 mov esi,[BmpPalette]
386
	 mov edi,[WhereCodingBMP]
387
	 add edi,54
388
	 mov ecx,16
389
	 rep movsd
390
 
391
	 ;coding image to bmp 4 bits format
392
	 mov esi,[PointerToImage]
393
	 mov edx,[WhereCodingBMP]
394
	 mov ebx,[Bmp_SizeX]
395
	 shl ebx,2	       ;4*(picture_size_x)
396
	 add ebx,31	       ;4*(picture_size_x)+31
397
	 shr ebx,5	       ;(4*(picture_size_x)+31)/32
398
	 mov [Bmp_doublewords],ebx ;double words in string
399
	 shl ebx,2
400
	 mov [Bmp_bytes_per_string],ebx ;bytes per string
401
	 mov ecx,[Bmp_SizeY]
402
	 dec ecx
403
	 imul ebx,ecx
404
	 add edx,54+64
405
	 add edx,ebx
406
 
407
	 mov ebp,[Bmp_bytes_per_string]
408
 
409
	 mov ebx,[Bmp_SizeY]
410
	 mov [Bmp_Counter2],ebx
411
 
412
	 mov edi,edx
413
 
414
	 xor ebx,ebx
415
	 copy_lines_4:
416
 
417
	 mov ecx,[Bmp_bytes_per_string]
418
	 shl ecx,1
419
 
420
	 and [Bmp_Counter3],0
421
	 push esi
422
 
423
	  rep_movsb_4:
424
	  mov eax,[esi]
425
	  and eax,0xffffff
426
 
427
	    mov [Bmp_save1],esi
428
	    mov [Bmp_save2],ecx
429
	    mov [Bmp_save3],ebx
430
	    mov esi,[BmpPalette]
431
	    xor ecx,ecx
432
	     find_color_in_palette_:
433
	       mov ebx,[esi]
434
	       and ebx,0xffffff
435
	       cmp eax,ebx	     ;color fined ?
436
	       je color_fined_
437
		 add esi,4
438
		 inc ecx
439
	       cmp ecx,16
440
	       jl find_color_in_palette_
441
	       color_fined_:
442
	      mov [Bmp_Counter],ecx	;number color in palette
443
	    mov esi,[Bmp_save1]
444
	    mov ecx,[Bmp_save2]
445
	    mov ebx,[Bmp_save3]
446
 
447
	  xor eax,eax
448
	  mov eax,[Bmp_Counter]
449
	  shl bl,4
450
	  add bl,al
451
 
452
	   mov eax,[Bmp_Counter3]
453
	   and eax,1b
454
	   test eax,eax 	     ;next block ready ?
455
	   jz no_ready
456
	    mov [edi],bl	      ;4 bit color
457
	    inc edi
458
	   no_ready:
459
 
460
	  add esi,3
461
	  inc [Bmp_Counter3]
462
 
463
	  dec ecx
464
	  jnz rep_movsb_4
465
 
466
	 pop esi
467
 
468
	 add esi,[Bmp_SizeX]
469
	 add esi,[Bmp_SizeX]
470
	 add esi,[Bmp_SizeX]
471
 
472
	 sub edi,ebp
473
	 sub edi,ebp
474
 
475
	 dec [Bmp_Counter2]
476
	 jnz copy_lines_4
477
 
478
	 ;total size of bmp file
479
	 mov edi,[WhereCodingBMP]
480
	 mov ebx,[Bmp_bytes_per_string]
481
	 imul ebx,[Bmp_SizeY]
482
	 add ebx,(54+64)
483
 
484
	 ;crate list of bmp description
485
	 mov [edi],word 'BM'
486
	 mov [edi+2],ebx
487
	 mov [edi+10],dword 54+64
488
	 mov [edi+14],dword 40
489
	 mov edx,[Bmp_SizeX]
490
	 mov ecx,[Bmp_SizeY]
491
	 mov [edi+18],edx
492
	 mov [edi+22],ecx
493
	 mov [edi+26],word 1
494
	 mov [edi+28],word 4
495
	 mov [edi+30],dword 0
496
	 mov edx,[Bmp_bytes_per_string]
497
	 imul edx,ecx
498
	 mov [edi+34],edx
499
	 mov [edi+38],dword 0
500
	 mov [edi+42],dword 0
501
	 mov [edi+46],dword 0
502
 
503
	 ret
504
	 no_16_colors:
505
 
506
	 ;**********************************************
507
	 ;******************8 bits BMP******************
508
	 ;**********************************************
509
 
510
	 cmp eax,256
511
	 ja no_8_bits_per_pixel
512
	 ;copy palette
513
	 mov esi,[BmpPalette]
514
	 mov edi,[WhereCodingBMP]
515
	 add edi,54
516
	 mov ecx,256
517
	 rep movsd
518
 
519
	 ;coding image to bmp 8 bits format
520
	 mov esi,[PointerToImage]
521
	 mov edx,[WhereCodingBMP]
522
	 mov ebx,[Bmp_SizeX]
523
	 shl ebx,3	       ;8*(picture_size_x)
524
	 add ebx,31	       ;8*(picture_size_x)+31
525
	 shr ebx,5	       ;(8*(picture_size_x)+31)/32
526
	 mov [Bmp_doublewords],ebx ;double words in string
527
	 shl ebx,2
528
	 mov [Bmp_bytes_per_string],ebx ;bytes per string
529
 
530
	 mov ecx,[Bmp_SizeY]
531
	 dec ecx
532
	 imul ebx,ecx
533
	 add edx,(1024+54)
534
	 add edx,ebx	       ;in edx pointer to copy bitmap arrea
535
 
536
	 mov ebp,[Bmp_bytes_per_string]
537
	 shl ebp,1
538
 
539
	 mov ebx,[Bmp_SizeY]
540
	 mov edi,edx
541
 
542
	 copy_lines_8:
543
 
544
	 mov ecx,[Bmp_bytes_per_string]
545
	 mov [Bmp_save1],esi
546
	  rep_movsb_8:
547
	  mov eax,[esi]
548
	  and eax,0xffffff
549
	  push esi
550
	  push ecx
551
	  push ebx
552
	   mov esi,[BmpPalette]
553
	   xor ecx,ecx
554
	    find_color_in_palette:
555
	    mov ebx,[esi]
556
	    and ebx,0xffffff
557
	    cmp eax,ebx 	  ;color fined ?
558
	    je color_fined
559
	    add esi,4
560
	    inc ecx
561
	    cmp ecx,256
562
	    jl find_color_in_palette
563
	    color_fined:
564
	    mov [Bmp_Counter],ecx     ;number color in palette
565
	  pop ebx
566
	  pop ecx
567
	  pop esi
568
	  mov eax,[Bmp_Counter]
569
	  mov [edi],al		  ;8 bit color
570
	  add esi,3
571
	  inc edi
572
 
573
	  dec ecx
574
	  jnz rep_movsb_8
575
 
576
	 mov esi,[Bmp_save1]
577
 
578
	 add esi,[Bmp_SizeX]
579
	 add esi,[Bmp_SizeX]
580
	 add esi,[Bmp_SizeX]
581
 
582
	 sub edi,ebp
583
	 dec ebx
584
	 jnz copy_lines_8
585
 
586
	 ;total size of bmp file
587
	 mov edi,[WhereCodingBMP]
588
	 mov ebx,[Bmp_bytes_per_string]
589
	 imul ebx,[Bmp_SizeY]
590
	 add ebx,54+1024
591
 
592
	 ;crate list of bmp description
593
	 mov [edi],word 'BM'
594
	 mov [edi+2],ebx
595
	 mov [edi+10],dword 54+1024
596
	 mov [edi+14],dword 40
597
	 mov edx,[Bmp_SizeX]
598
	 mov ecx,[Bmp_SizeY]
599
	 mov [edi+18],edx
600
	 mov [edi+22],ecx
601
	 mov [edi+26],word 1
602
	 mov [edi+28],word 8
603
	 mov [edi+30],dword 0
604
	 mov edx,[Bmp_bytes_per_string]
605
	 imul edx,ecx
606
	 mov [edi+34],edx
607
	 mov [edi+38],dword 0
608
	 mov [edi+42],dword 0
609
	 mov [edi+46],dword 0
610
 
611
	 ret
612
	 no_8_bits_per_pixel:
613
 
614
	 ;**********************************************
615
	 ;*******************24 bit BMP*****************
616
	 ;**********************************************
617
 
618
	 cmp eax,256
619
	 jle no_32_bits_per_pixel
620
	 ;copy picture
621
	 mov esi,[PointerToImage]
622
	 mov edx,[WhereCodingBMP]
623
	 mov ebx,[Bmp_SizeX]
624
	 shl ebx,3	       ;8*(picture_size_x)
625
	 lea ebx,[ebx+ebx*2]   ;3*8*(picture_size_x)
626
	 add ebx,31	       ;3*8*(picture_size_x)+31
627
	 shr ebx,5	       ;(3*8*(picture_size_x)+31)/32
628
	 mov [Bmp_doublewords],ebx ;double words in string
629
	 shl ebx,2
630
	 mov [Bmp_bytes_per_string],ebx ;bytes per string
631
	 mov ecx,[Bmp_SizeY]
632
	 dec ecx
633
	 imul ebx,ecx
634
	 add edx,54
635
	 add edx,ebx	     ;in edx pointer to start of copy bit map
636
 
637
	 mov ebp,[Bmp_bytes_per_string]
638
	 shl ebp,1
639
 
640
	 mov ebx,[Bmp_SizeY]
641
 
642
	 mov esi,[PointerToImage]
643
	 mov edi,edx
644
 
645
	 mov edx,[Bmp_SizeX]
646
	 lea edx,[edx+edx*2]
647
 
648
	 copy_lines_24:
649
 
650
	   push esi
651
	   mov ecx,[Bmp_doublewords]
652
	   rep_movsb_24:
653
	      mov eax,[esi]
654
	      mov [edi],eax
655
	   add esi,4
656
	   add edi,4
657
	   dec ecx
658
	   jnz rep_movsb_24
659
	   pop esi
660
 
661
	 add esi,edx
662
	 sub edi,ebp
663
	 dec ebx
664
	 jnz copy_lines_24
665
 
666
	 ;total size of bmp fille
667
	 mov edi,[WhereCodingBMP]
668
	 mov ebx,[Bmp_bytes_per_string]
669
	 imul ebx,[Bmp_SizeY]
670
	 add ebx,54
671
 
672
	 ;write info to structure of bmp file
673
	 mov [edi],word 'BM'
674
	 mov [edi+2],ebx
675
	 mov [edi+10],dword 54	  ;where begin bmp imige
676
	 mov [edi+14],dword 40	  ;total size of structure number two
677
	 mov edx,[Bmp_SizeX]
678
	 mov ecx,[Bmp_SizeY]
679
	 mov [edi+18],edx
680
	 mov [edi+22],ecx
681
	 mov [edi+26],word 1
682
	 mov [edi+28],word 24	  ;bytes per pixel
683
	 mov [edi+30],dword 0
684
	 mov edx,[Bmp_bytes_per_string]
685
	 imul edx,ecx
686
	 mov [edi+34],edx	  ;size of bmp image
687
	 mov [edi+38],dword 0
688
	 mov [edi+42],dword 0
689
	 mov [edi+46],dword 0
690
	 ret
691
	 no_32_bits_per_pixel:
692
 
693
 
694
	 ret
695
 
696
PointerToImage	     dd 0
697
WhereCodingBMP	     dd 0
698
BmpPalette	     dd 0
699
Bmp_SizeX	     dd 0
700
Bmp_SizeY	     dd 0
701
Bmp_Counter	     dd 0
702
Bmp_Counter2	     dd 0
703
Bmp_Counter3	     dd 0
704
Bmp_save1	     dd 0
705
Bmp_save2	     dd 0
706
Bmp_save3	     dd 0
707
Bmp_bytes_per_string dd 0
708
Bmp_doublewords      dd 0