Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1792 | yogev_ezra | 1 | convert_bmp_to_img: |
2 | movzx eax,word [ebp+28] |
||
3 | mul dword [ebp+18] |
||
4 | mov ebx,32 |
||
5 | div ebx |
||
6 | test edx,edx |
||
7 | je noaddword |
||
8 | inc eax |
||
9 | noaddword: |
||
10 | mov [dwps],eax ;dwps-doublewords per string |
||
11 | shl eax,2 |
||
12 | mov [bps],eax ;bps-bytes per string |
||
13 | |||
14 | cmp dword [ebp+34],0 |
||
15 | jne yespicsize ;if picture size is defined |
||
16 | mul dword [ebp+22] |
||
17 | mov dword [ebp+34],eax |
||
18 | |||
19 | yespicsize: |
||
20 | mov eax,ebp |
||
21 | push eax |
||
22 | sub eax, [ebp+2];file size |
||
23 | mov [soi],eax ;soi-start of image area for drawing |
||
24 | pop eax |
||
25 | add eax, [ebp+10] |
||
26 | mov [sop],eax ;sop-start of picture in file |
||
27 | add eax, [ebp+34] |
||
28 | mov [eop],eax ;eop-end of picture in file |
||
29 | mov eax, [ebp+18] |
||
30 | mov ebx,3 |
||
31 | mul ebx ;3x pixels in eax |
||
32 | |||
33 | mov edi,[soi] ;initializing |
||
34 | mov esi,[eop] |
||
35 | sub esi,[bps] |
||
36 | |||
37 | |||
38 | nextstring: |
||
39 | push edi |
||
40 | mov ecx,[dwps] |
||
41 | cld |
||
42 | rep movsd |
||
43 | convert1: |
||
44 | pop edi |
||
45 | sub esi,[bps] |
||
46 | sub esi,[bps] |
||
47 | cmp esi,[sop] |
||
48 | jb nomorestring |
||
49 | add edi,eax |
||
50 | jmp nextstring |
||
51 | |||
52 | nomorestring: |
||
53 | ret |
||
54 | |||
55 | bps dd 0 |
||
56 | dwps dd 0 |
||
57 | soi dd 0 |
||
58 | sop dd 0 |
||
59 | eop dd 0 |