emendelson Posted April 21, 2023 Posted April 21, 2023 I've searched for an answer to this question but haven't found one, so I hope it's OK to ask here. Is there any UDF or anything else that will display a PNG or TIFF image in a control like GuiCtrlCreatePic? The built-in function only displays BMP, JPG, or GIF, but I'm trying to create a script that displays a PNG or TIFF. Probably the answer is No, but I can always hope.
Moderators Solution Melba23 Posted April 21, 2023 Moderators Solution Posted April 21, 2023 emendelson, If you look in my _ExtMsgBox UDF (link is in my sig) you will find the __EMB_ShowPNG function which allows you display PNG files. No idea about TIFF I am afraid. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
AutoBert Posted April 21, 2023 Posted April 21, 2023 (edited) I don't know if it works with TIF's but sure it works with PNG's. Edit: Just tested with the welcomefax.tif (the onliest tif i have) and it works: expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GUICtrlPic.au3> #include <Array.au3> Global $hGui = GUICreate("Show Tif",@DesktopWidth, @DesktopHeight) Global $aDim = WinGetClientSize($hGui) Global $sAutoItPath If @Compiled Then $sAutoItPath=RegRead64('HKLM\Software\AutoIt v3\AutoIt', 'InstallDir')&'\' Else $sAutoItPath= StringReplace(@AutoItExe, "autoit3.exe", "")&'\' $sAutoItPath= StringReplace(@AutoItExe, "autoit3_x64.exe", "") EndIf Global $Background = _GUICtrlPic_Create("C:\Users\(len)Bert\Downloads\Documents\Fax\Inbox\WelcomeFax.tif", 0, 0, $aDim[0], $aDim[1], $SS_CENTERIMAGE, Default) GUICtrlSetState(-1, $Gui_DISABLE) GUISetState() While 1 Switch GUIGetMsg() Case $Gui_EVENT_CLOSE Exit EndSwitch WEnd Func RegRead64($sKeyname, $sValue) ;Aus AutoUpdateIt.au3 Local $sRes = RegRead($sKeyname, $sValue) If @error And @AutoItX64 Then $sKeyname = StringReplace($sKeyname, "HKEY_LOCAL_MACHINE", "HKLM") $sKeyname = StringReplace($sKeyname, "HKLM\SOFTWARE\", "HKLM\SOFTWARE\Wow6432Node\") $sRes = RegRead($sKeyname, $sValue) If @error Then SetError(1) Return "" EndIf EndIf SetError(0) Return $sRes EndFunc ;==>RegRead64 GUICtrlPic.au3 Edited April 21, 2023 by AutoBert Zedna 1
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