xzaz Posted December 14, 2007 Share Posted December 14, 2007 (edited) Case $volgende GuiSwitch($ShowGUI,$volgende) GUICtrlDelete($picview) GuiCtrlSetData($label,$FileList[$i]) $Filesize = _ImageGetSize($standardmap&"\"&$FileList[$i]) ;GUICtrlCreatePic ( filename, left, top [, width [, height [, style [, exStyle]]]] ) if $Filesize[0] > $_ShowGUIH AND $Filesize[1] > $_ShowGUIW Then $picview = GuiCtrlCreatePic($standardmap&"\"&$FileList[$i],($_ShowGUIW - ($Filesize[0] / 2))/2,($_ShowGUIH - ($Filesize[1] /2))/2,$Filesize[0] / 2,$Filesize[1] / 2) Else $picview = GuiCtrlCreatePic($standardmap&"\"&$FileList[$i],($_ShowGUIW - $Filesize[0])/2,($_ShowGUIH - $Filesize[1])/2,$Filesize[0],$Filesize[1]) Endif $i = $i +1 Well here you see that when there is a photo bigger then the screen w/h it just makes him half size and put it on the screen. Now when there are some bigger photo's, how can i make sure the fill up the FULL screen as much as posible? $_ShowGUIH = res H $_ShowGUIW = res W Edited December 14, 2007 by xzaz Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
John117 Posted December 14, 2007 Share Posted December 14, 2007 * without reading your post. put the gui width and heigth @ @desktopWidth and @DesktopHeigth do the same to the picture. Link to comment Share on other sites More sharing options...
xzaz Posted December 14, 2007 Author Share Posted December 14, 2007 * without reading your post. put the gui width and heigth @ @desktopWidth and @DesktopHeigthdo the same to the picture.Then you gonna strech the photo, and you dont got the orignal size , if someone has a widescreen monitor the photo streches. Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
DW1 Posted December 14, 2007 Share Posted December 14, 2007 you need to find out which of the two (height or width), is the one that is going to fill the screen... find the difference in size, convert to ratio, or percentage, and apply that ratio/percentage to the other axis as well... that would be proper fullscreen viewing without morphing the picture AutoIt3 Online Help Link to comment Share on other sites More sharing options...
DW1 Posted December 14, 2007 Share Posted December 14, 2007 I got no sleep last night, so if that made no sense at all, just let me know... I knew what I was saying AutoIt3 Online Help Link to comment Share on other sites More sharing options...
xzaz Posted December 14, 2007 Author Share Posted December 14, 2007 I got no sleep last night, so if that made no sense at all, just let me know... I knew what I was sayingIts the same as PhotoShop resizing a picture with the "Constrain Propotions"I know what your refering to, i'll put some work against it and post mine findings Tnx, and go to sleep! Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
Kip Posted December 14, 2007 Share Posted December 14, 2007 I know how to do it, but im not in the mood for a lot of maths MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
John117 Posted December 14, 2007 Share Posted December 14, 2007 (edited) sorry this took so long - had to learn itdo the followingnavigate to: http://www.microsoft.com/downloads/details...;DisplayLang=endownload: WIAAutSDK.zip -install to C:\ or what ever u useopen command prompttype: CD C:\ Press Entertype: regsvr32 wiaaut.dllWait for ok message then run the follow code against on of your GIFs or modify if you are using another pic format$oImage = ObjCreate("WIA.ImageFile") $s_Path = FileOpenDialog("Select Gif Image", @ScriptDir, "Gif Images (*.gif)") $oImage.LoadFile($s_Path) $HorizontalRes = $oImage.HorizontalResolution $VerticalRes = $oImage.verticalResolution MsgBox(0, "Horizontal", $HorizontalRes) MsgBox(0, "Vertical", $VerticalRes)oÝ÷ Ú붬ëa¡Ûhb,¨º¼"vØZØ^a¢{ayùr¢¸ v¥¦-º¹I havent checked this last if stuff btw -just an example Edited December 14, 2007 by Hatcheda Link to comment Share on other sites More sharing options...
xzaz Posted December 14, 2007 Author Share Posted December 14, 2007 @Hatcheda, Uhmmm thanks i think, dunno what to do with it, get some wierd numbers (eg: 300,300) 0_o Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
John117 Posted December 14, 2007 Share Posted December 14, 2007 (edited) make sure the one you used is $HorizontalRes = $oImage.HorizontalResolution $VerticalRes = $oImage.verticalResolution so they would be the same Ill build you a demo I guess so that you can see it work (and me too) Edited December 14, 2007 by Hatcheda Link to comment Share on other sites More sharing options...
xzaz Posted December 14, 2007 Author Share Posted December 14, 2007 Wow tnx for your support so far appreciate that. I got this but still got the 300,300 numbers, i have to study the code more to understand how he comes up with 300,300: $oImage = ObjCreate("WIA.ImageFile") $s_Path = FileOpenDialog("Select Gif Image", @ScriptDir, "Gif Images (*.jpg)") $oImage.LoadFile($s_Path) $HorizontalRes = $oImage.HorizontalResolution $VerticalRes = $oImage.verticalResolution If $HorizontalRes > @DesktopWidth then $HorizontalRes = ($HorizontalRes - @DesktopWidth) $HorizontalResPerc = ($HorizontalRes - @DesktopWidth)/$HorizontalRes $VerticalRes = $VerticalRes*$HorizontalResPerc Else If $VerticalRes > @DesktopHeight then $VerticalRes = ($VerticalRes - @DesktopHeight) $VerticalResPerc = ($VerticalRes - @DesktopHeight)/$VerticalRes $HorizontalRes = $HorizontalRes*$VerticalResPerc EndIf Endif MsgBox(0, "Horizontal", $HorizontalRes) MsgBox(0, "Vertical", $VerticalRes) Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
John117 Posted December 14, 2007 Share Posted December 14, 2007 Ha ha ha -I was giving you the pixels per square inch $HorizontalRes = $oImage.Width $VerticalRes = $oImage.Height Link to comment Share on other sites More sharing options...
xzaz Posted December 14, 2007 Author Share Posted December 14, 2007 Ha ha ha -I was giving you the pixels per square inch $HorizontalRes = $oImage.Width $VerticalRes = $oImage.Heightlol i saw it just wanted to edit my post: $oImage = ObjCreate("WIA.ImageFile") $s_Path = FileOpenDialog("Select Gif Image", @ScriptDir, "Gif Images (*.jpg)") $oImage.LoadFile($s_Path) $HorizontalRes = $oImage.HorizontalResolution $VerticalRes = $oImage.verticalResolution MsgBox(0,"",$HorizontalRes) MsgBox(0,"",$verticalRes) If $HorizontalRes > @DesktopWidth then $HorizontalRes = ($HorizontalRes - @DesktopWidth) $HorizontalResPerc = ($HorizontalRes - @DesktopWidth)/$HorizontalRes $VerticalRes = $VerticalRes*$HorizontalResPerc Else If $VerticalRes > @DesktopHeight then $VerticalRes = ($VerticalRes - @DesktopHeight) $VerticalResPerc = ($VerticalRes - @DesktopHeight)/$VerticalRes $HorizontalRes = $HorizontalRes*$VerticalResPerc EndIf Endif MsgBox(0, "Horizontal", $HorizontalRes) MsgBox(0, "Vertical", $VerticalRes) First 2 msgboxes where already 300,300 XD Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
John117 Posted December 14, 2007 Share Posted December 14, 2007 (edited) ok here ya go. kindly disregard the previouse if post. it was full of errors. working example below. expandcollapse popup#include <GUIConstants.au3> Opt("GUIOnEventMode", 1) HotKeySet("{ESC}", "_Custom_Exit") $GUI = GUICreate("Unimportant GUI", @DesktopWidth, @DesktopHeight, Default, Default, $WS_POPUPWINDOW) $oImage = ObjCreate("WIA.ImageFile") $s_Path = FileOpenDialog("Select Gif Image", @ScriptDir, "Gif Images (*.gif)") $oImage.LoadFile($s_Path) $HorizontalRes = $oImage.Width $VerticalRes = $oImage.Height If $oImage.Width > @DesktopWidth then $HorizontalRes = @DesktopWidth $HorizontalResPerc = ($oImage.Width - @DesktopWidth)/$oImage.Width $VerticalRes = $oImage.Height*$HorizontalResPerc ElseIf $oImage.Height > @DesktopHeight then $VerticalRes = @DesktopHeight $VerticalResPerc = ($oImage.Height - @DesktopHeight)/$oImage.Height $HorizontalRes = $oImage.Width*$VerticalResPerc EndIf ;GUICtrlCreatePic ( filename, left, top [, width [, height [, style [, exStyle]]]] ) $Pic = GUICtrlCreatePic($s_Path, Default, Default, $HorizontalRes, $VerticalRes) GUISetState(@SW_SHOW, $GUI) ; ============================================================================ ; Main Loop ; ============================================================================ While 1 Sleep(10) WEnd ; ============================================================================ ; Functions ; ============================================================================ Func _Custom_Exit() Exit EndFunc ;==>_Custom_Exit tested on 1920 X 1080 -horizontal where pic is too big -working Trying to fix height adjustment by % of horizontal adjustment Edited December 14, 2007 by Hatcheda Link to comment Share on other sites More sharing options...
John117 Posted December 14, 2007 Share Posted December 14, 2007 ok, fixed expandcollapse popup#include <GUIConstants.au3> Opt("GUIOnEventMode", 1) HotKeySet("{ESC}", "_Custom_Exit") $GUI = GUICreate("Unimportant GUI", @DesktopWidth, @DesktopHeight, Default, Default, $WS_POPUPWINDOW) $oImage = ObjCreate("WIA.ImageFile") $s_Path = FileOpenDialog("Select Gif Image", @ScriptDir, "Gif Images (*.jpg)") $oImage.LoadFile($s_Path) $HorizontalRes = $oImage.Width $VerticalRes = $oImage.Height If $oImage.Width > @DesktopWidth then $HorizontalRes = @DesktopWidth $HorizontalResPerc = (1 - (($oImage.Width - @DesktopWidth)/$oImage.Width)) $VerticalRes = $oImage.Height*($HorizontalResPerc) ElseIf $oImage.Height > @DesktopHeight then $VerticalRes = @DesktopHeight $VerticalResPerc = (1 - (($oImage.Height - @DesktopHeight)/$oImage.Height)) $HorizontalRes = $oImage.Width*($VerticalResPerc) EndIf ;GUICtrlCreatePic ( filename, left, top [, width [, height [, style [, exStyle]]]] ) $Pic = GUICtrlCreatePic($s_Path, Default, Default, $HorizontalRes, $VerticalRes) GUISetState(@SW_SHOW, $GUI) ; ============================================================================ ; Main Loop ; ============================================================================ While 1 Sleep(10) WEnd ; ============================================================================ ; Functions ; ============================================================================ Func _Custom_Exit() Exit EndFunc ;==>_Custom_Exit If you have any questions, please let me know. Link to comment Share on other sites More sharing options...
xzaz Posted December 14, 2007 Author Share Posted December 14, 2007 Awesome work m8 tnx :"> Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
John117 Posted December 14, 2007 Share Posted December 14, 2007 your welcome. (wondering if you would have any issue where h <> w but both are bigger than @dw and @dh) it seems like it would run through both if statements and only bring one of them in. May need some work (in theory) -if H = W then the second if would fix it for wide or square monitors. If either smaller than @d~ then one or the other if would fix it. Just a question of both bigger and not equal Link to comment Share on other sites More sharing options...
xzaz Posted December 14, 2007 Author Share Posted December 14, 2007 expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.10.0 Author: Eise van der Spoel Script Function: Foto's bekijken voor de kerk #ce ---------------------------------------------------------------------------- #include <GUIConstants.au3> #include <File.au3> #Include <Array.au3> #include <image_get_size.au3> #Include <Misc.au3> $oImage = ObjCreate("WIA.ImageFile") Global $Filter = "*.jpg" Global $ShowGUI,$MainGUI,$label,$picview,$color,$countfotosgui,$photo_folder,$fotofoldergui Global $Title = "Foto Show v1.0" Global $FileList Global $i = 1 Global $_fotoW = 535 Global $_fotoH = 535 Global $_ShowGUIW = @DesktopWidth Global $_ShowGUIH = @DesktopHeight _MainGUI() Func _MainGUI() Local $_MainGUIW = 415 Local $_MainGUIH = 50 $MainGUI = GuiCreate($Title,$_MainGUIW,$_MainGUIH) $map = GuiCtrlCreateButton("Map",1,2,40) $start = GuiCtrlCreateButton("Start",45,2,40) $stop = GuiCtrlCreateButtoN("Stop",90,2,40) $vorige = GuiCtrlCreateButton("<",145,2,20) $volgende = GuiCtrlCreateButton(">",170,2,20) $pauze = GuiCtrlCreateButton("||",195,2,20) $sluiten = GuiCtrlCreateButton("Sluiten",$_MainGUIW - 45,2,40) $color = GuictrlCreateButton("BG",$_MainGUIW - 90,2,40) GuiCtrlCreatelabel("Foto map:",1,35) $fotofoldergui = GuiCtrLCreatelabel("",55,35,200) GuiCtrlCreateLabel("Foto:",170,35,100) $countfotosgui = GuiCtrlCreateLabel("<>",210,35,30) GUICtrlSetState($stop,$GUI_DISABLE) GUiCtrlSetState($volgende,$GUI_DISABLE) GUiCtrlSetState($vorige,$GUI_DISABLE) GuiCtrlSetState($pauze,$GUI_DISABLE) GuiSetstate() _LoadFotos() While 1 $msg = GuiGetMsg() Switch $msg Case $map _LoadFotos() Case $start if WinExists("fotoshow") Then ; Else GUICtrlSetState($stop,$GUI_ENABLE) GUiCtrlSetState($volgende,$GUI_ENABLE) GUiCtrlSetState($vorige,$GUI_ENABLE) GuiCtrlSetState($pauze,$GUI_ENABLE) _Openshow() Endif WinActivate($Title) Case $stop GUIDelete($ShowGUI) GUICtrlSetState($stop,$GUI_DISABLE) GUiCtrlSetState($volgende,$GUI_DISABLE) GUiCtrlSetState($vorige,$GUI_DISABLE) GuiCtrlSetState($pauze,$GUI_DISABLE) Case $GUI_EVENT_CLOSE,$sluiten Exit 0 Case $volgende if $i = $FileList[0] +1 Then MsgBox(0,"Bericht","Geen volgende foto") Else GuiCtrlSetData($countfotosgui,$i&"/"&$FileList[0]) GuiSwitch($ShowGUI,$volgende) GuiCtrlSetData($label,$FileList[$i]) ;$Filesize = _ImageGetSize($photo_folder&"\"&$FileList[$i]) ;GUICtrlCreatePic ( filename, left, top [, width [, height [, style [, exStyle]]]] ) $s_Path = $photo_folder&"\"&$FileList[$i] $oImage.LoadFile($s_Path) $HorizontalRes = $oImage.Width $VerticalRes = $oImage.Height If $oImage.Width > @DesktopWidth then $HorizontalRes = @DesktopWidth $HorizontalResPerc = (1 - (($oImage.Width - @DesktopWidth)/$oImage.Width)) $VerticalRes = $oImage.Height*($HorizontalResPerc) ElseIf $oImage.Height > @DesktopHeight then $VerticalRes = @DesktopHeight $VerticalResPerc = (1 - (($oImage.Height - @DesktopHeight)/$oImage.Height)) $HorizontalRes = $oImage.Width*($VerticalResPerc) EndIf GUICtrlDelete($picview) ;GUICtrlCreatePic ( filename, left, top [, width [, height [, style [, exStyle]]]] ) $picview = GuiCtrlCreatePic($photo_folder&"\"&$FileList[$i],Default,Default,$HorizontalRes,$VerticalRes) $i = $i +1 Endif Case $vorige if $i = 1 Then MSgBox(0,"Bericht","Geen vorige foto") Else GuiCtrlSetData($countfotosgui,$i&"/"&$FileList[0]) GuiSwitch($ShowGUI,$volgende) GuiCtrlSetData($label,$FileList[$i]) $Filesize = _ImageGetSize($photo_folder&"\"&$FileList[$i]) ;GUICtrlCreatePic ( filename, left, top [, width [, height [, style [, exStyle]]]] ) if $Filesize[0] > $_ShowGUIH AND $Filesize[1] > $_ShowGUIW Then GUICtrlDelete($picview) $picview = GuiCtrlCreatePic($photo_folder&"\"&$FileList[$i],($_ShowGUIW - ($Filesize[0] / 2))/2,($_ShowGUIH - ($Filesize[1] /2))/2,$Filesize[0] / 2,$Filesize[1] / 2) Else GUICtrlDelete($picview) $picview = GuiCtrlCreatePic($photo_folder&"\"&$FileList[$i],($_ShowGUIW - $Filesize[0])/2,($_ShowGUIH - $Filesize[1])/2,$Filesize[0],$Filesize[1]) Endif $i = $i -1 Endif Case $color $color = _ChooseColor(2) GUISetBkColor ($color,$ShowGUI) EndSwitch WEnd Endfunc Func _Openshow() $ShowGUI = GuiCreate("fotoshow",$_ShowGUIW ,$_ShowGUIH,0,0,$WS_POPUP) $picview = GUICtrlCreatePic("logogkv.jpg",($_ShowGUIW - $_fotoW)/2,($_ShowGUIH - $_fotoH)/2,$_fotoW,$_fotoH) $label = GuiCtrlCreateLABEL("",0,0,100) GuiSetBKColor(0xFFFFFF) GuiSetState() EndFunc Func _LoadFotos() $i = 1 $photo_folder = FileSelectFolder("Selecteer de map waarin de foto's zich bevinden", "", 1) $FileList=_FileListToArray($photo_folder,$Filter) If @Error=1 Then MsgBox (0,"","Geen bestanden en/of map gekozen.") Exit 0 Endif GuiCtrlSetData($fotofoldergui,$photo_folder) GuiCtrlSetData($countfotosgui,"0/"&$FileList[0]) Endfunc Got this so far, but he cant adjust the picture right, any suggestion? Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
John117 Posted December 14, 2007 Share Posted December 14, 2007 (edited) *Again with out reading, you could just add the pic section into a function. Each time you run the function you use guictrldelete($pic) then read it with the new pic. if not what you mean, i will read and translate as it stands, I dont not have all the includes required to run your script. but by the condition of it I believe you should be able to add a function to delete and rebuild $pic good luck with it! Edited December 14, 2007 by Hatcheda Link to comment Share on other sites More sharing options...
xzaz Posted December 14, 2007 Author Share Posted December 14, 2007 expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.10.0 Author: Eise van der Spoel,http://www.autoitscript.com/forum/index.php?showtopic=59495&st=0 Script Function: Foto's bekijken voor de kerk #ce ---------------------------------------------------------------------------- #include <GUIConstants.au3> #include <File.au3> #Include <Array.au3> #Include <Misc.au3> $oImage = ObjCreate("WIA.ImageFile") Global $Filter = "*.jpg" Global $ShowGUI,$MainGUI,$label,$picview,$color,$countfotosgui,$photo_folder,$fotofoldergui,$loop Global $Title = "Foto Show v1.0" Global $FileList Global $i = 1 Global $_fotoW = 535 Global $_fotoH = 535 Global $_ShowGUIW = @DesktopWidth Global $_ShowGUIH = @DesktopHeight Global $stoppen = 0 _MainGUI() Func _MainGUI() Local $_MainGUIW = 415 Local $_MainGUIH = 50 $MainGUI = GuiCreate($Title,$_MainGUIW,$_MainGUIH) $map = GuiCtrlCreateButton("Map",1,2,40) $start = GuiCtrlCreateButton("Start",45,2,40) $stop = GuiCtrlCreateButtoN("Stop",90,2,40) $vorige = GuiCtrlCreateButton("<",145,2,20) $volgende = GuiCtrlCreateButton(">",170,2,20) $pauze = GuiCtrlCreateButton("||",195,2,20) $sluiten = GuiCtrlCreateButton("Sluiten",$_MainGUIW - 45,2,40) $color = GuictrlCreateButton("BG",$_MainGUIW - 90,2,40) $loop = GuiCtrlCreateButton("Loop",$_MainGUIW - 135,2,40) GuiCtrlCreatelabel("Foto map:",1,35) $fotofoldergui = GuiCtrLCreatelabel("",55,35,200) GuiCtrlCreateLabel("Foto:",170,35,100) $countfotosgui = GuiCtrlCreateLabel("<>",210,35,30) GUICtrlSetState($stop,$GUI_DISABLE) GUiCtrlSetState($volgende,$GUI_DISABLE) GUiCtrlSetState($vorige,$GUI_DISABLE) GuiCtrlSetState($pauze,$GUI_DISABLE) GuiCtrlSetState($loop,$GUI_DISABLE) GuiSetstate() _LoadFotos() While 1 $msg = GuiGetMsg() Switch $msg Case $map _LoadFotos() Case $start if WinExists("fotoshow") Then ; Else GUICtrlSetState($stop,$GUI_ENABLE) GUiCtrlSetState($volgende,$GUI_ENABLE) GUiCtrlSetState($vorige,$GUI_ENABLE) GuiCtrlSetState($pauze,$GUI_ENABLE) GuiCtrlSetState($loop,$GUI_ENABLE) _Openshow() Endif WinActivate($Title) Case $stop GUIDelete($ShowGUI) GUICtrlSetState($stop,$GUI_DISABLE) GUiCtrlSetState($volgende,$GUI_DISABLE) GUiCtrlSetState($vorige,$GUI_DISABLE) GuiCtrlSetState($pauze,$GUI_DISABLE) GuiCtrlSetState($loop,$GUI_DISABLE) Case $GUI_EVENT_CLOSE,$sluiten Exit 0 Case $volgende if $i = $FileList[0] +1 Then MsgBox(0,"Bericht","Geen volgende foto") Else photofunc() $i = $i +1 Endif Case $vorige if $i = 1 Then MSgBox(0,"Bericht","Geen vorige foto") Else photofunc() $i = $i -1 Endif Case $color $color = _ChooseColor(2) GUISetBkColor ($color,$ShowGUI) Case $stop $stoppen = 1 Case $loop loopfoto() EndSwitch WEnd Endfunc Func _Openshow() $ShowGUI = GuiCreate("fotoshow",$_ShowGUIW ,$_ShowGUIH,0,0,$WS_POPUP) $picview = GUICtrlCreatePic("logogkv.jpg",($_ShowGUIW - $_fotoW)/2,($_ShowGUIH - $_fotoH)/2,$_fotoW,$_fotoH) $label = GuiCtrlCreateLABEL("",0,0,100) GuiSetBKColor(0xFFFFFF) GuiSetState() EndFunc Func _LoadFotos() $i = 1 $photo_folder = FileSelectFolder("Selecteer de map waarin de foto's zich bevinden", "", 1) $FileList=_FileListToArray($photo_folder,$Filter) If @Error=1 Then MsgBox (0,"","Geen bestanden en/of map gekozen.") Exit 0 Endif GuiCtrlSetData($fotofoldergui,$photo_folder) GuiCtrlSetData($countfotosgui,"0/"&$FileList[0]) Endfunc Func loopfoto() While 1 $Sleep = Sleep(3*1000) if $i = $FileList[0] +1 Then MsgBox(0,"Bericht","Geen volgende foto") $stoppen = 1 Else photofunc() $i = $i +1 Endif if $stoppen = 1 Then Exitloop Wend EndFunc Func photofunc() GuiCtrlSetData($countfotosgui,$i&"/"&$FileList[0]) GuiSwitch($ShowGUI,$loop) GuiCtrlSetData($label,$FileList[$i]) ;$Filesize = _ImageGetSize($photo_folder&"\"&$FileList[$i]) ;GUICtrlCreatePic ( filename, left, top [, width [, height [, style [, exStyle]]]] ) $s_Path = $photo_folder&"\"&$FileList[$i] $oImage.LoadFile($s_Path) $HorizontalRes = $oImage.Width $VerticalRes = $oImage.Height If $oImage.Width > @DesktopWidth then $HorizontalRes = @DesktopWidth $HorizontalResPerc = (1 - (($oImage.Width - @DesktopWidth)/$oImage.Width)) $VerticalRes = $oImage.Height*($HorizontalResPerc) ElseIf $oImage.Height > @DesktopHeight then $VerticalRes = @DesktopHeight $VerticalResPerc = (1 - (($oImage.Height - @DesktopHeight)/$oImage.Height)) $HorizontalRes = $oImage.Width*($VerticalResPerc) EndIf GUICtrlDelete($picview) ;GUICtrlCreatePic ( filename, left, top [, width [, height [, style [, exStyle]]]] ) $picview = GuiCtrlCreatePic($photo_folder&"\"&$FileList[$i],Default,Default,$HorizontalRes,$VerticalRes) Endfunc Well something like this , I have to edit te code, its a little bit mess right now Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
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