Belini Posted June 15, 2023 Posted June 15, 2023 (edited) Estou tentando usar o UDF feito por@AlmiranteAlkex para exibir as imagens em fullscreen mas quando coloco em fullscreen só a tela fica toda preta mas a imagem não ocupa a tela inteira, alguém sabe como fazer a imagem ocupar a tela inteira usando essa UDF? Link para baixar o UDF e os arquivos: https://www.autoitscript.com/forum/applications/core/interface/file/attachment.php?id=37773 Edited June 15, 2023 by Belini My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
Werty Posted June 15, 2023 Posted June 15, 2023 Have you looked at SplashImageOn() with $DLG_NOTITLE ? https://www.autoitscript.com/autoit3/docs/functions/SplashImageOn.htm Some guy's script + some other guy's script = my script!
Belini Posted June 15, 2023 Author Posted June 15, 2023 (edited) @Werty _ with SplashImageOn() it doesn't work, it just flashes without showing images I managed to open the image in full screen, but it flickers between image changes and there is no video effect Files used in my test: https://mega.nz/file/wIsXxCSB#0B6n4zq-AMsRYRDWKyKfLqOOY9wuA4STEwEELJz8Z6Q Edited June 15, 2023 by Belini My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
Gianni Posted June 16, 2023 Posted June 16, 2023 I messed up the original "SDL Example image viewer.au3" listing a bit.... ... also put the "Imgs" folder there... expandcollapse popup#include "SDL_image.au3" #include "SDL_gfx.au3" #include "SDL.au3" OnAutoItExitRegister("_Quit") _SDL_Startup_gfx() _SDL_Init_image() _SDL_Init($_SDL_INIT_VIDEO) $Surface = _SDL_SetVideoMode(@DesktopWidth, @DesktopHeight, 32, BitOR($_SDL_SWSURFACE, $_SDL_FULLSCREEN)) ; , $_SDL_DOUBLEBUF )) ;Software surfaces doesn't need to be locked ;) $Image = _IMG_Load(".\imgs\1.jpg") $Struct = DllStructCreate($tagSDL_SURFACE, $Image) $W = DllStructGetData($Struct, "w") $H = DllStructGetData($Struct, "h") $ZoomX = @DesktopWidth / $W $ZoomY = @DesktopHeight / $H For $i = 1 To 169 $Image = _IMG_Load(".\imgs\" & $i & ".jpg") $SurfaceZoom = _SDL_zoomSurface($Image, $ZoomX, $ZoomY, 1) _SDL_FreeSurface($Image) ; $Surface = _SDL_GuiCreate($W/$Zoom & "x" & $H/$Zoom, $W, $H , 32, $_SDL_SWSURFACE) _SDL_BlitSurface($SurfaceZoom, 0, $Surface, 0) _SDL_FreeSurface($SurfaceZoom) _SDL_Flip($Surface) Next _Quit() #cs While 1 Sleep(10) WEnd #ce Func _Quit() ConsoleWrite("Once upon a time... You saw me ;)" & @CRLF) ;This will like neeever happen.... Almost. If IsDeclared("Surface") Then _SDL_FreeSurface($Surface) If $__SDL_DLL <> -1 Then _SDL_Quit() If $__SDL_DLL_image <> -1 Then _SDL_Shutdown_image() If $__SDL_DLL_gfx <> -1 Then _SDL_Shutdown_gfx() EndFunc ;==>_Quit Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
Belini Posted June 16, 2023 Author Posted June 16, 2023 (edited) @Gianni stopped blinking but the image exchange is slow and I even got a good speed but then the image doesn't occupy the whole screen. #include "SDL_image.au3" #include "SDL.au3" HotKeySet("{esc}", "_Quit") global $conta_img = 0 _SDL_Init_image() _SDL_Init($_SDL_INIT_VIDEO) $Surface = _SDL_SetVideoMode(@DesktopWidth, @DesktopHeight, 32, BitOR($_SDL_SWSURFACE, $_SDL_FULLSCREEN)) ; , $_SDL_DOUBLEBUF )) ;Software surfaces doesn't need to be locked ;) AdlibRegister("Player_jpg", 50) while 1 sleep(1000) wend func Player_jpg() $conta_img += 1 if $conta_img > 169 then $conta_img = 1 $Image = _IMG_Load(".\imgs\" & $conta_img & ".jpg") _SDL_BlitSurface($Image, 0, $Surface, 0) _SDL_FreeSurface($Image) _SDL_Flip($Surface) endfunc Func _Quit() ConsoleWrite("Once upon a time... You saw me ;)" & @CRLF) ;This will like neeever happen.... Almost. If IsDeclared("Surface") Then _SDL_FreeSurface($Surface) If $__SDL_DLL <> -1 Then _SDL_Quit() If $__SDL_DLL_image <> -1 Then _SDL_Shutdown_image() Edited June 16, 2023 by Belini My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
Belini Posted June 18, 2023 Author Posted June 18, 2023 Can anyone give a tip on how to show the image in fullscreen without getting slow using sdl? My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
20Ice18 Posted June 19, 2023 Posted June 19, 2023 Don't know if you tried it but first Download the AutoItX package from the official website. Extract the package and copy the "AutoItX3.dll" file to your AutoIt installation folder. Initialize SDL and create a fullscreen window: _SDL_Init() _SDL_SetHint($SDL_HINT_RENDER_SCALE_QUALITY, "1") ; Optional: Set rendering quality hint ; Create a fullscreen SDL window Global $window = _SDL_CreateWindow("Fullscreen Image", $SDL_WINDOWPOS_UNDEFINED, $SDL_WINDOWPOS_UNDEFINED, @DesktopWidth, @DesktopHeight, BitOR($SDL_WINDOW_FULLSCREEN, $SDL_WINDOW_SHOWN)) If Not $window Then MsgBox(16, "Error", "Failed to create SDL window.") _SDL_Quit() Exit EndIf ; Create a renderer for the window Global $renderer = _SDL_CreateRenderer($window, -1, $SDL_RENDERER_ACCELERATED) If Not $renderer Then MsgBox(16, "Error", "Failed to create SDL renderer.") _SDL_DestroyWindow($window) _SDL_Quit() Exit EndIf Load and render the image on the renderer: ; Load the image using SDL_Image Global $imageSurface = _IMG_Load("path/to/image.jpg") If Not $imageSurface Then MsgBox(16, "Error", "Failed to load image.") _SDL_DestroyRenderer($renderer) _SDL_DestroyWindow($window) _SDL_Quit() Exit EndIf ; Create a texture from the image surface Global $imageTexture = _SDL_CreateTextureFromSurface($renderer, $imageSurface) If Not $imageTexture Then MsgBox(16, "Error", "Failed to create texture.") _SDL_FreeSurface($imageSurface) _SDL_DestroyRenderer($renderer) _SDL_DestroyWindow($window) _SDL_Quit() Exit EndIf ; Clear the renderer and render the image texture _SDL_RenderClear($renderer) _SDL_RenderCopy($renderer, $imageTexture, 0, 0) _SDL_RenderPresent($renderer) Process the SDL events and handle the window close event: Local $event = _SDL_EventStruct() Local $quit = False While Not $quit While _SDL_PollEvent($event) If $event.type = $SDL_QUIT Then $quit = True EndIf WEnd ; Your main program logic goes here WEnd Clean up and quit SDL when finished: _SDL_DestroyTexture($imageTexture) _SDL_FreeSurface($imageSurface) _SDL_DestroyRenderer($renderer) _SDL_DestroyWindow($window) _SDL_Quit() for example like this: expandcollapse popup#include <AutoItX3.dll> #include <SDL.au3> #include <SDL_Image.au3> _SDL_Init() _SDL_SetHint($SDL_HINT_RENDER_SCALE_QUALITY, "1") ; Optional: Set rendering quality hint Global $window = _SDL_CreateWindow("Fullscreen Image", $SDL_WINDOWPOS_UNDEFINED, $SDL_WINDOWPOS_UNDEFINED, @DesktopWidth, @DesktopHeight, BitOR($SDL_WINDOW_FULLSCREEN, $SDL_WINDOW_SHOWN)) If Not $window Then MsgBox(16, "Error", "Failed to create SDL window.") _SDL_Quit() Exit EndIf Global $renderer = _SDL_CreateRenderer($window, -1, $SDL_RENDERER_ACCELERATED) If Not $renderer Then MsgBox(16, "Error", "Failed to create SDL renderer.") _SDL_DestroyWindow($window) _SDL_Quit() Exit EndIf Global $imageSurface = _IMG_Load("path/to/image.jpg") If Not $imageSurface Then MsgBox(16, "Error", "Failed to load image.") _SDL_DestroyRenderer($renderer) _SDL_DestroyWindow($window) _SDL_Quit() Exit EndIf Global $imageTexture = _SDL_CreateTextureFromSurface($renderer, $imageSurface) If Not $imageTexture Then MsgBox(16, "Error", "Failed to create texture.") _SDL_FreeSurface($imageSurface) _SDL_DestroyRenderer($renderer) _SDL_DestroyWindow($window) _SDL_Quit() Exit EndIf _SDL_RenderClear($renderer) _SDL_RenderCopy($renderer, $imageTexture, 0, 0) _SDL_RenderPresent($renderer) Local $event = _SDL_EventStruct() Local $quit = False While Not $quit While _SDL_PollEvent($event) If $event.type = $SDL_QUIT Then $quit = True EndIf WEnd ; Your main program logic goes here WEnd _SDL_DestroyTexture($imageTexture) _SDL_FreeSurface($imageSurface) _SDL_DestroyRenderer($renderer) _SDL_DestroyWindow($window) _SDL_Quit() replace path with your path ❤️
Belini Posted June 19, 2023 Author Posted June 19, 2023 @20Ice18 here did not work, it gives an error when I put the include AutoItX3.dll without putting the dll in the folder: >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" /ErrorStdOut "G:\SDL v14\Teste SDL\Novo(a) AutoIt v3 Script.au3" G:\SDL v14\Teste SDL\Novo(a) AutoIt v3 Script.au3 (1) : ==> Error opening the file.: #include <AutoItX3.dll> >Exit code: 1 Error when placing the dll: >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" /ErrorStdOut "G:\SDL v14\Teste SDL\Novo(a) AutoIt v3 Script.au3" G:\SDL v14\Teste SDL\Novo(a) AutoIt v3 Script.au3 (65) : ==> Unterminated string.: ÿt$ÿ4Ð?Æ??$\" >Exit code: 1 @20Ice18 what version of autoit did you test on and what version of AutoItX3.dll did you use? My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
water Posted June 19, 2023 Posted June 19, 2023 As described here you can't use #include this way. It doesn't make sense to call AutoItX from AutoIt. AutoItX is made to be called from other programming languages to use a subset of AutoIt. And I do not think that sylremo is completely wrong with his estimation. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
sylremo Posted June 19, 2023 Posted June 19, 2023 @20Ice18, feeding AI with the author's question as a prompt might not always be a good idea, let alone pasting its response without even running it yourself. As we speak, I can clearly see that you have wasted both your and others' time, as these out-of-context responses create more confusion than helps. We appreciated your efforts, but I'd suggest you take your time finding solutions in the future 😄
Belini Posted June 19, 2023 Author Posted June 19, 2023 (edited) actually including AutoItX3.dll won't work but what about making the image full screen with good speed does anyone have any tips? Edited June 19, 2023 by Belini My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
Gianni Posted June 19, 2023 Posted June 19, 2023 try to change 32 to 8 on line 11 of the listing in my previous post.... Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
Werty Posted June 19, 2023 Posted June 19, 2023 Word of warning about the link with the files used, when i ran it my computer crashed when trying to press escape, and ofcourse I had alot of work open. Some guy's script + some other guy's script = my script!
Belini Posted June 20, 2023 Author Posted June 20, 2023 @Gianni still slow as before even changing from 32 to 8 like you suggested @Werty I'm sorry for the work you lost and I don't understand why it happened because the _Quit() function just closes the resources that were opened and what I did was just create a hotkey to call the _Quit() function My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
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