forked from KolibriOS/kolibrios
libimg:
img.flip.layer fix for images of scanline width less than 4 bytes bmp: check for more InfoHeader types git-svn-id: svn://kolibrios.org@2691 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
997837429a
commit
ef860d6920
@ -92,11 +92,13 @@ img.decode.bmp.length_rest equ length_rest
|
|||||||
|
|
||||||
mov [bTopDown], 0
|
mov [bTopDown], 0
|
||||||
|
|
||||||
cmp eax, 12
|
cmp eax, 12 ; 0x0C
|
||||||
jz .old1
|
jz .old1
|
||||||
cmp eax, 40
|
cmp eax, 40 ; 0x28
|
||||||
jz .normal
|
jz .normal
|
||||||
cmp eax, 56
|
cmp eax, 56 ; 0x38
|
||||||
|
je .normal
|
||||||
|
cmp eax, 108 ; 0x6C
|
||||||
jnz .error
|
jnz .error
|
||||||
; convert images with <= 8 bpp to 8bpp, other - to 32 bpp
|
; convert images with <= 8 bpp to 8bpp, other - to 32 bpp
|
||||||
.normal:
|
.normal:
|
||||||
|
@ -884,13 +884,17 @@ endl
|
|||||||
mov ecx, [scanline_len]
|
mov ecx, [scanline_len]
|
||||||
push ecx
|
push ecx
|
||||||
shr ecx, 2
|
shr ecx, 2
|
||||||
@@: mov eax, [esi]
|
@@:
|
||||||
|
dec ecx
|
||||||
|
js @f
|
||||||
|
mov eax, [esi]
|
||||||
xchg eax, [edi]
|
xchg eax, [edi]
|
||||||
mov [esi], eax
|
mov [esi], eax
|
||||||
add esi, 4
|
add esi, 4
|
||||||
add edi, 4
|
add edi, 4
|
||||||
sub ecx, 1
|
jmp @b
|
||||||
jnz @b
|
@@:
|
||||||
|
|
||||||
pop ecx
|
pop ecx
|
||||||
and ecx, 3
|
and ecx, 3
|
||||||
jz .cont_line_vert
|
jz .cont_line_vert
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
;;================================================================================================;;
|
;;================================================================================================;;
|
||||||
|
|
||||||
include 'pcx.inc'
|
include 'pcx.inc'
|
||||||
;include '../../../../system/board/trunk/debug.inc'
|
|
||||||
|
|
||||||
;;================================================================================================;;
|
;;================================================================================================;;
|
||||||
proc img.is.pcx _data, _length ;//////////////////////////////////////////////////////////////////;;
|
proc img.is.pcx _data, _length ;//////////////////////////////////////////////////////////////////;;
|
||||||
@ -238,14 +237,16 @@ endp
|
|||||||
|
|
||||||
|
|
||||||
;;================================================================================================;;
|
;;================================================================================================;;
|
||||||
proc img.encode.pcx _img, _p_length, _options ;///////////////////////////////////////////////////;;
|
proc img.encode.pcx _img, _common, _specific ;////////////////////////////////////////////////////;;
|
||||||
;;------------------------------------------------------------------------------------------------;;
|
;;------------------------------------------------------------------------------------------------;;
|
||||||
;? Encode image into raw data in pcx format ;;
|
;? Encode image into raw data in pcx format ;;
|
||||||
;;------------------------------------------------------------------------------------------------;;
|
;;------------------------------------------------------------------------------------------------;;
|
||||||
;> _img = pointer to image ;;
|
;> [_img] = pointer to image ;;
|
||||||
|
;> [_common] = format independent options ;;
|
||||||
|
;> [_specific] = 0 / pointer to the structure of format specific options ;;
|
||||||
;;------------------------------------------------------------------------------------------------;;
|
;;------------------------------------------------------------------------------------------------;;
|
||||||
;< eax = 0 (error) or pointer to encoded data ;;
|
;< eax = 0 / pointer to encoded data ;;
|
||||||
;< _p_length = encoded data length ;;
|
;< ecx = error code / the size of encoded data ;;
|
||||||
;;================================================================================================;;
|
;;================================================================================================;;
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
ret
|
ret
|
||||||
|
Loading…
Reference in New Issue
Block a user