libimg: export img.resize_data

git-svn-id: svn://kolibrios.org@8395 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Ivan Baravy 2020-12-13 18:07:49 +00:00
parent 201cf02d85
commit 11e69b4021
2 changed files with 14 additions and 9 deletions

View File

@ -238,7 +238,7 @@ img.decode.gif.cur_color_table_size_child equ ebp + 4 + 4 + 4*3 + 4
movzx eax, [ebx + gif.ImageDescriptor.Width]
movzx ecx, [ebx + gif.ImageDescriptor.Height]
push edx
stdcall img._.resize_data, [img], eax, ecx
stdcall img.resize_data, [img], eax, ecx
pop edx
or eax, eax
jz .error
@ -875,7 +875,7 @@ proc img.decode.gif._.superimpose ;/////////////////////////////////////////////
movzx eax, [ebx + sizeof.gif.Image + gif.LogicalScreenDescriptor.ScreenHeight]
push eax
movzx eax, [ebx + sizeof.gif.Image + gif.LogicalScreenDescriptor.ScreenWidth]
stdcall img._.resize_data, edx, eax
stdcall img.resize_data, edx, eax
pop edx
test eax, eax
jz .palette_nomem
@ -989,7 +989,7 @@ proc img.decode.gif._.superimpose ;/////////////////////////////////////////////
movzx eax, [ebx + gif.Header.lsd.ScreenHeight]
push eax
movzx eax, [ebx + gif.Header.lsd.ScreenWidth]
stdcall img._.resize_data, edx, eax
stdcall img.resize_data, edx, eax
pop edx
test eax, eax
jz .convrgb_nomem
@ -1092,7 +1092,7 @@ proc img.decode.gif._.superimpose ;/////////////////////////////////////////////
movzx eax, [ebx + gif.Header.lsd.ScreenHeight]
push eax
movzx eax, [ebx + gif.Header.lsd.ScreenWidth]
stdcall img._.resize_data, edx, eax
stdcall img.resize_data, edx, eax
pop edx
test eax, eax
jz .rgb_nomem

View File

@ -852,7 +852,7 @@ proc img.create _width, _height, _type ;////////////////////////////////////////
push eax
stdcall img._.resize_data, eax, [_width], [_height]
stdcall img.resize_data, eax, [_width], [_height]
or eax, eax
jz .error.2
@ -2557,13 +2557,17 @@ proc img._.delete _img ;////////////////////////////////////////////////////////
endp
;;================================================================================================;;
proc img._.resize_data _img, _width, _height ;////////////////////////////////////////////////////;;
proc img.resize_data _img, _width, _height ;//////////////////////////////////////////////////////;;
;;------------------------------------------------------------------------------------------------;;
;? --- TBD --- ;;
;? Resize data block of image. New size is calculated from _width and _height params and internal ;;
;? Image.Type value. All the internal fields are updated iff succeeded. ;;
;? This function does not scale images, use img.scale if you need to. ;;
;;------------------------------------------------------------------------------------------------;;
;> --- TBD --- ;;
;> _img = pointer to image ;;
;> _width = new width ;;
;> _height = new height ;;
;;------------------------------------------------------------------------------------------------;;
;< --- TBD --- ;;
;< eax = 0 (fail) / pointer to the new pixels data ;;
;;================================================================================================;;
push ebx esi
mov ebx, [_img]
@ -2819,6 +2823,7 @@ export \
img.get_scaled_size, 'img_get_scaled_size', \
img.convert , 'img_convert' , \
img.blend , 'img_blend' , \
img.resize_data , 'img_resize_data' , \
img.formats_table , 'img_formats_table'
; import from deflate unpacker