Jump to content
Sign in to follow this  

Show fullscreenimage (on top)

Recommended Posts

Hello i'm tring to have autoit display fullscreen image on top and resample it from higher size to lover (or vice versa) to screensize. I found somehthing cxImage, but it don't work for me and i didn't find anythink about how to do fullscreen.

Where should i start and what i sould search for?

Share this post

Link to post
Share on other sites

No need go into advanced stuff:

#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
$picname = FileOpenDialog("Picture to display", @MyDocumentsDir, "Pictures (*.jpg;*.bmp)", 1)
If $picname="" Then Exit
    $msg = GUIGetMsg()
Edited by monoceres

Broken link? PM me and I'll send you the file!

Share this post

Link to post
Share on other sites

Wow, that is superb, i really didn't expected full working script as reply! Thanks!

Edited by Lolita

Share this post

Link to post
Share on other sites

Here are a couple of functions that you might find to be helpful with this project:

Func GetImagePercentSize($i_width, $i_height, $intPercent)
    Local $retArr[2]
    $retArr[0] = Round($i_width * $intPercent / 100)
    $retArr[1] = Round($i_height * $intPercent / 100)
    Return $retArr
; I think simucal wrote this one ...
Func GetImageDimensions($Filepath_Gif)
    $Filepath_Gif = FileGetLongName($Filepath_Gif); validate the passed GIF filepath.
    If @error Then Return SetError($GIF_FILE_NOTFOUND, 0, 0); passed file not found.
    Local $sFile = StringMid($Filepath_Gif, StringInStr($Filepath_Gif, "\", 0, -1) + 1)
    Local $sDir = StringLeft($Filepath_Gif, StringInStr($Filepath_Gif, "\", 0, -1) - 1)
    Local $oShellApp = ObjCreate("Shell.Application")
    If Not IsObj($oShellApp) Then Return SetError($GIF_OBJCREATE_ERROR, 0, 0)
;__ErrorHandlerRegister(); this is where to register an AutoIt Error Handler function
    Local $oDir = $oShellApp.NameSpace($sDir)
    Local $oFile = $oDir.Parsename($sFile)
    If Not IsObj($oFile) Then Return SetError($GIF_COM_ERROR, 0, 0)
    Local $sProperty = $oDir.GetDetailsOf($oFile, 26)
    Local $ImgDimensions = StringSplit($sProperty, " ")
    $ImgDimensions[0] = Number($ImgDimensions[1])
    $ImgDimensions[1] = Number($ImgDimensions[3])
    $oFile = 0
    $oShellApp = 0
;__GifErrorHandlerUnregister(); you could de-register the handler at this point.
    ReDim $ImgDimensions[2]
    Return SetError($GIF_SUCCESS, 0, $ImgDimensions)
Edited by Squirrely1

Das Häschen benutzt Radar

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...