forked from KolibriOS/kolibrios
Libimg: Fix bug with 16-bit BMP padding.
git-svn-id: svn://kolibrios.org@7523 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
cf7de4af9c
commit
c7f696b50f
@ -967,6 +967,8 @@ locals
|
|||||||
unshift bmp.RgbByteQuad
|
unshift bmp.RgbByteQuad
|
||||||
mask bmp.RgbQuad
|
mask bmp.RgbQuad
|
||||||
delta dd ?
|
delta dd ?
|
||||||
|
dataoff dd ? ; offset of encoded data
|
||||||
|
; row data are aligned on dword from data start, not file start
|
||||||
endl
|
endl
|
||||||
|
|
||||||
mov [delta], 4
|
mov [delta], 4
|
||||||
@ -1018,6 +1020,7 @@ endl
|
|||||||
|
|
||||||
mov edi, [edx + Image.Data]
|
mov edi, [edx + Image.Data]
|
||||||
pop esi
|
pop esi
|
||||||
|
mov [dataoff], esi
|
||||||
|
|
||||||
;;------------------------------------------------------------------------------------------------;;
|
;;------------------------------------------------------------------------------------------------;;
|
||||||
|
|
||||||
@ -1068,6 +1071,10 @@ endl
|
|||||||
dec ecx
|
dec ecx
|
||||||
jnz .next_pixel
|
jnz .next_pixel
|
||||||
|
|
||||||
|
sub esi, [dataoff]
|
||||||
|
add esi, 3
|
||||||
|
and esi, not 3
|
||||||
|
add esi, [dataoff]
|
||||||
pop ecx
|
pop ecx
|
||||||
dec ecx
|
dec ecx
|
||||||
jnz .next_line
|
jnz .next_line
|
||||||
|
Loading…
Reference in New Issue
Block a user