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
|
||||
|
||||
cmp eax, 12
|
||||
cmp eax, 12 ; 0x0C
|
||||
jz .old1
|
||||
cmp eax, 40
|
||||
cmp eax, 40 ; 0x28
|
||||
jz .normal
|
||||
cmp eax, 56
|
||||
cmp eax, 56 ; 0x38
|
||||
je .normal
|
||||
cmp eax, 108 ; 0x6C
|
||||
jnz .error
|
||||
; convert images with <= 8 bpp to 8bpp, other - to 32 bpp
|
||||
.normal:
|
||||
|
@ -884,13 +884,17 @@ endl
|
||||
mov ecx, [scanline_len]
|
||||
push ecx
|
||||
shr ecx, 2
|
||||
@@: mov eax, [esi]
|
||||
@@:
|
||||
dec ecx
|
||||
js @f
|
||||
mov eax, [esi]
|
||||
xchg eax, [edi]
|
||||
mov [esi], eax
|
||||
add esi, 4
|
||||
add edi, 4
|
||||
sub ecx, 1
|
||||
jnz @b
|
||||
jmp @b
|
||||
@@:
|
||||
|
||||
pop ecx
|
||||
and ecx, 3
|
||||
jz .cont_line_vert
|
||||
|
@ -18,7 +18,6 @@
|
||||
;;================================================================================================;;
|
||||
|
||||
include 'pcx.inc'
|
||||
;include '../../../../system/board/trunk/debug.inc'
|
||||
|
||||
;;================================================================================================;;
|
||||
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 ;;
|
||||
;< _p_length = encoded data length ;;
|
||||
;< eax = 0 / pointer to encoded data ;;
|
||||
;< ecx = error code / the size of encoded data ;;
|
||||
;;================================================================================================;;
|
||||
xor eax, eax
|
||||
ret
|
||||
|
Loading…
Reference in New Issue
Block a user