PeterAtkin Posted June 6, 2010 Posted June 6, 2010 (edited) I wish to get the size (x,y) of the graphic file so I can automate the below code a little, as the size of the graphic file can change regularly.This is what I gotSplashImageOn("Splash Screen", @ScriptDir & "\cfu_logo.bmp", 200, 59, 90, 220, 17)This is what I would like to see or similar.SplashImageOn("Splash Screen", @ScriptDir & "\cfu_logo.bmp", $length, $width, 90, 220, 17)Hope that makes sense. Edited June 6, 2010 by PeterAtkin [topic='115020'] AD Domain Logon Script[/topic]
Yoriz Posted June 6, 2010 Posted June 6, 2010 You could use this UDF: ImageGetInfo GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF.
PeterAtkin Posted June 6, 2010 Author Posted June 6, 2010 (edited) Thanks Yoriz, this works a treat and so simple.... this is what it ended up looking like, $logo_file = @ScriptDir & "\cfu_logo.bmp" $aInfo = _ImageGetInfo($logo_file) SplashImageOn("Splash Screen", $logo_file, _ImageGetParam($aInfo, "Width"), _ImageGetParam($aInfo, "Height"), -1, -1, 1) Edited June 6, 2010 by PeterAtkin [topic='115020'] AD Domain Logon Script[/topic]
UEZ Posted June 6, 2010 Posted June 6, 2010 Thanks Yoriz, this works a treat and so simple.... this is what it ended up looking like, $logo_file = @ScriptDir & "\cfu_logo.bmp" $aInfo = _ImageGetInfo($logo_file) SplashImageOn("Splash Screen", $logo_file, _ImageGetParam($aInfo, "Width"), _ImageGetParam($aInfo, "Height"), -1, -1, 1) You can use also GDI+ to get image dimension: #include <GDIPlus.au3> $logo_file = "C:\Program Files\AutoIt3\Examples\GUI\MSLogo.jpg" _GDIPlus_Startup() $hImage = _GDIPlus_BitmapCreateFromFile($logo_file) $iX = _GDIPlus_ImageGetWidth ($hImage) $iY = _GDIPlus_ImageGetHeight ($hImage) _GDIPlus_BitmapDispose($hImage) _GDIPlus_Shutdown() SplashImageOn("Splash Screen", $logo_file, $iX, $iY, -1, -1, 1) Sleep(5000) SplashOff() BR, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
PeterAtkin Posted June 6, 2010 Author Posted June 6, 2010 Both solutions seems equal to me, would I be correct in terms of compatibility that the GDI+ would be the better route.. any ideas. And thanks for the positive response.. [topic='115020'] AD Domain Logon Script[/topic]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now