Rev 2388 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2388 | Rev 2733 | ||
---|---|---|---|
Line 128... | Line 128... | ||
128 | 128 | ||
Line 129... | Line 129... | ||
129 | jmp .common_process |
129 | jmp .common_process |
Line 130... | Line 130... | ||
130 | 130 | ||
131 | .process_grayscale: |
131 | .process_grayscale: |
132 | 132 | ||
133 | stdcall img.create, ebx, edx, Image.bpp8 |
133 | stdcall img.create, ebx, edx, Image.bpp8i |
Line 134... | Line 134... | ||
134 | mov [retvalue], eax |
134 | mov [retvalue], eax |
Line 158... | Line 158... | ||
158 | jmp .common_process |
158 | jmp .common_process |
Line 159... | Line 159... | ||
159 | 159 | ||
Line 160... | Line 160... | ||
160 | 160 | ||
161 | .process_indexed: |
161 | .process_indexed: |
162 | 162 | ||
163 | stdcall img.create, ebx, edx, Image.bpp8 |
163 | stdcall img.create, ebx, edx, Image.bpp8i |
Line 164... | Line 164... | ||
164 | mov [retvalue], eax |
164 | mov [retvalue], eax |
Line 215... | Line 215... | ||
215 | add ecx, 1 |
215 | add ecx, 1 |
216 | @@: |
216 | @@: |
217 | dec [layer_count] |
217 | dec [layer_count] |
218 | jnz .still |
218 | jnz .still |
Line 219... | Line 219... | ||
219 | 219 | ||
220 | cmp [ebx + Image.Type], Image.bpp8 |
220 | cmp [ebx + Image.Type], Image.bpp8i |
221 | jne .quit |
221 | jne .quit |
222 | stdcall xcf._.pack_8a, ebx |
222 | stdcall xcf._.pack_8a, ebx |
Line 223... | Line 223... | ||
223 | jmp .quit |
223 | jmp .quit |
Line 370... | Line 370... | ||
370 | mov [channel_height], eax |
370 | mov [channel_height], eax |
371 | lodsd |
371 | lodsd |
372 | bswap eax |
372 | bswap eax |
373 | add esi, eax |
373 | add esi, eax |
Line 374... | Line 374... | ||
374 | 374 | ||
375 | stdcall img.create, [channel_width], [channel_height], Image.bpp8 |
375 | stdcall img.create, [channel_width], [channel_height], Image.bpp8i |
376 | mov ebx, eax |
376 | mov ebx, eax |
377 | test ebx, ebx |
377 | test ebx, ebx |
378 | jz .quit |
378 | jz .quit |
379 | invoke mem.alloc, sizeof.xcf_ext |
379 | invoke mem.alloc, sizeof.xcf_ext |
Line 441... | Line 441... | ||
441 | lodsd |
441 | lodsd |
442 | bswap eax |
442 | bswap eax |
443 | mov [layer_height], eax |
443 | mov [layer_height], eax |
444 | lodsd |
444 | lodsd |
445 | bswap eax |
445 | bswap eax |
446 | mov edx, Image.bpp16 |
446 | mov edx, Image.bpp8a |
447 | mov [color_step], 1 |
447 | mov [color_step], 1 |
448 | cmp eax, 2 |
448 | cmp eax, 2 |
449 | jge @f |
449 | jge @f |
450 | mov [color_step], 3 |
450 | mov [color_step], 3 |
451 | mov edx, Image.bpp32 |
451 | mov edx, Image.bpp32 |
Line 897... | Line 897... | ||
897 | 897 | ||
898 | mov eax, [edx + Image.Width] |
898 | mov eax, [edx + Image.Width] |
899 | imul eax, [img_y1] |
899 | imul eax, [img_y1] |
900 | add eax, [img_x1] |
900 | add eax, [img_x1] |
901 | shl eax, 1 |
901 | shl eax, 1 |
902 | cmp [edx + Image.Width], Image.bpp16 |
902 | cmp [edx + Image.Width], Image.bpp8a |
903 | je @f |
903 | je @f |
904 | shl eax, 1 |
904 | shl eax, 1 |
905 | @@: |
905 | @@: |
Line 906... | Line 906... | ||
906 | add esi, eax |
906 | add esi, eax |
907 | 907 | ||
908 | mov eax, [ebx + Image.Width] |
908 | mov eax, [ebx + Image.Width] |
909 | imul eax, [bottom_y1] |
909 | imul eax, [bottom_y1] |
910 | add eax, [bottom_x1] |
910 | add eax, [bottom_x1] |
911 | shl eax, 1 |
911 | shl eax, 1 |
912 | cmp [ebx + Image.Width], Image.bpp8 |
912 | cmp [ebx + Image.Width], Image.bpp8i |
913 | je @f |
913 | je @f |
914 | shl eax, 1 |
914 | shl eax, 1 |
Line 915... | Line 915... | ||
915 | @@: |
915 | @@: |
916 | add edi, eax |
916 | add edi, eax |
917 | 917 | ||
918 | 918 | ||
919 | mov eax, [edx + Image.Width] |
919 | mov eax, [edx + Image.Width] |
920 | sub eax, [copy_width] |
920 | sub eax, [copy_width] |
921 | shl eax, 1 |
921 | shl eax, 1 |
922 | cmp [edx + Image.Width], Image.bpp16 |
922 | cmp [edx + Image.Width], Image.bpp8a |
Line 923... | Line 923... | ||
923 | je @f |
923 | je @f |
924 | shl eax, 1 |
924 | shl eax, 1 |
925 | @@: |
925 | @@: |
926 | mov [img_total_bpl], eax |
926 | mov [img_total_bpl], eax |
927 | 927 | ||
928 | mov eax, [ebx + Image.Width] |
928 | mov eax, [ebx + Image.Width] |
929 | sub eax, [copy_width] |
929 | sub eax, [copy_width] |
930 | shl eax, 1 |
930 | shl eax, 1 |
Line 931... | Line 931... | ||
931 | cmp [ebx + Image.Width], Image.bpp8 |
931 | cmp [ebx + Image.Width], Image.bpp8i |
932 | je @f |
932 | je @f |
933 | shl eax, 1 |
933 | shl eax, 1 |
934 | @@: |
934 | @@: |
935 | mov [bottom_total_bpl], eax |
935 | mov [bottom_total_bpl], eax |
936 | 936 | ||
937 | cmp [_layer_number], 0 |
937 | cmp [_layer_number], 0 |
938 | jne .not_first |
938 | jne .not_first |
939 | mov ecx, [copy_width] |
939 | mov ecx, [copy_width] |
940 | imul ecx, [copy_height] |
940 | imul ecx, [copy_height] |
Line 995... | Line 995... | ||
995 | stdcall edx, [copy_width], [copy_height], [bottom_total_bpl], [img_total_bpl] |
995 | stdcall edx, [copy_width], [copy_height], [bottom_total_bpl], [img_total_bpl] |
996 | jmp .done |
996 | jmp .done |
997 | @@: |
997 | @@: |
Line 998... | Line 998... | ||
998 | 998 | ||
999 | 999 | ||
1000 | cmp [ebx + Image.Type], Image.bpp8 |
1000 | cmp [ebx + Image.Type], Image.bpp8i |
1001 | jne @f |
1001 | jne @f |
1002 | stdcall xcf._.merge_8a, [copy_width], [copy_height], [img_total_bpl], [bottom_total_bpl] |
1002 | stdcall xcf._.merge_8a, [copy_width], [copy_height], [img_total_bpl], [bottom_total_bpl] |
1003 | jmp .done |
1003 | jmp .done |