ghetek Posted December 12, 2007 Posted December 12, 2007 how can i get the width and height of a jpg in pixels in my script?
weaponx Posted December 12, 2007 Posted December 12, 2007 Well if you are using the latest version (3.2.10.0) with the builtin GDI functions you could do this:#Include <GDIPlus.au3> $hImage = "C:\Documents and Settings\...\My Documents\My Pictures\Wallpaper\01232_lazydaysii_1920x1200.jpg" $H = _GDIPlus_ImageGetHeight($hImage) $W = _GDIPlus_ImageGetWidth($hImage) MsgBox(0,"",$H & "x" & $W)Unfortunately I get an avector out of bounds error and don't feel like fixing it.You could also try this UDF:http://www.autoitscript.com/forum/index.ph...0size&st=15
Kip Posted December 12, 2007 Posted December 12, 2007 #Include <GDIPlus.au3> $Path = @DesktopDir&"\zelfmoordkonijntje.jpg" _GDIPlus_Startup () $hImage = _GDIPlus_ImageLoadFromFile ($Path) $H = _GDIPlus_ImageGetHeight($hImage) $W = _GDIPlus_ImageGetWidth($hImage) MsgBox(0,"",$H & "x" & $W) _GDIPlus_ShutDown () MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
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