LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Thu Jan 10, 2002 9:27 pm Post subject: Find Bitmap Size |
|
|
Here is an easy script to find the size of a bitmap.
| Code: |
rem - A script to find the size of a bitmap
rem - create a dummy dialog without the Dialog Show
rem - because Child dlgs are easire to distroy
dialog create,dummy,0,0,0,0
dialog CREATE,Find Bitmap Size,-1,0,221,86
dialog ADD,STYLE,STYLE1,,,B,,004080
dialog ADD,TEXT,TEXT1,16,6,76,13,Select Bitmap:
dialog ADD,BUTTON,BUTTON1,14,100,64,24,Select,,HAND
dialog ADD,TEXT,TEXT2,60,8,80,13,Shameless plug:
dialog ADD,TEXT,TEXT3,60,92,114,13,www.CGingerich.cc,,CLICK,STYLE1,HAND
dialog SHOW
:evloop
wait event
goto @event()
:button1button
%%file = @filedlg(*.bmp)
if @ok()
if %%file
gosub getsize
end
end
info Width@tab()%%iwidth@cr()Height@tab()%%iheight
goto evloop
:text3click
shell open,http://www.cgingerich.cc
goto evloop
:getsize
dialog create,temp,0,0,0,0
dialog add,bitmap,temp,0,0,0,0,%%file
%%iwidth = @dlgpos(temp,W)
%%iheight = @dlgpos(temp,H)
dialog select,2
dialog close
%e = @event()
dialog select,1
exit
:close
stop
|
Why it's saying that the width and height is a link I have no idea!  _________________ Chris
Http://theblindhouse.com |
|