jlorenz1 Posted December 19, 2006 Posted December 19, 2006 Has anyone an UDF, which loads JPG Oor GIF Files as thumbnails/preview in the GUI) I tried it without success., because the files are different in height & width Thanx Johannes Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post]
JoshDB Posted December 19, 2006 Posted December 19, 2006 (edited) No, but it should be easy to make yourself. Recursively find images in a folder and then GUICtrlCreatePic them into your GUI. $maxwidth = 100 $maxheight = 100 If ImageWidth($file) > ImageWidth($file) Then $tempwidth = 100 $divisor = ImageWidth($file)/100 $tempheight = ImageHeight($file)/$divisor Else $tempheight = 100 $divisor = ImageHeight($file)/100 $tempwidth = ImageWidth($file)/$divisor EndIf GUICtlCreatePic($file,$x,$y,$tempwidth,$tempheight) NOTE: This was made here in the forum editor. Not in SCiTE - Not tested, either! Search for a UDF that finds image height/width. Anyways, I hope that helsp more than hinders. Edited December 19, 2006 by JoshDB Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite
Polyphem Posted December 19, 2006 Posted December 19, 2006 Neither have I a direct solution... but ... i learned that with imagemagick you can do real magic to images (blabla )... No, really. Download the package and search for the command line tool "convert.exe", read some docs and use it with run's stdin and stdout access, create thumbs as you like to @temp and embed them into your GUI. This post will be edited again by Polyphem: Tomorrow, 11:55 AM
jlorenz1 Posted December 19, 2006 Author Posted December 19, 2006 Thanks JoshDB and all I will try it jlorenz1@web.de Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post]
jlorenz1 Posted January 3, 2007 Author Posted January 3, 2007 Thanks JoshDB and all I will try it jlorenz1@web.de Summary of my experiences with thumbnails in AutoIT:1. Func GUICtrlCreatePic is absolutly the wrong Func for thumbnails. It can't adapt thumbnails to their width & height,even, if you use ControlMove. In this case only the frame would be adapt, not the content.2. Func GUICtrlCreateObj with an ActiveX-Element works generally fine (sometimes a picture won't be adapt to the size of the thumbnail, so you see only a part of it), but if you have multiple layers like tabs there are dirty resultats.For example: If you show an ActiveX-Thumbnail only in tab-0, all colours of the controls in tab1 etc. have strange colours caused by this. Solution perhaps: Integrate a second GUI without Titlebar in the first GUI, but then you need two simultan scripts. Not really a great idea.3. Only pictures with the extansions GIF and JPG are shown. PNG and TIFs aren't supported.4. In my case the last solution was GUICtrlCreatePic, ' cause I need only a preview to check the picture. Unfortunately with the resultat that it will be shown in the static width and the static height of GUICtrlCreatePic.5. A great help was UDF of LazyCat to estimate the width and the height of unknown pictures. Thanks LazyCat! I hope this overview helps you. My impression is that this basic intention appears always each month in the forum, but isn't really solved. Johannes Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post]
tonyology Posted January 3, 2007 Posted January 3, 2007 (edited) Many thanks Johannes for that speedy reply Firstly, don't you hate those newbies that come in and always start a post with the phrase... "I'm new to programming, can you please... " I do, but alas, here goes... I'm new to programming, , well programming with AutoIt anyway, so to start, a brief, semi technical desc of the program i want to implement I want to design a simple slideshow app which incorporates 2 panes, left and right to view thumbnails of pictures. The left is an input pane, and the right an output. The left is a directory/folder where user can Bluetooth images to, and show up as thumbnails, so that I can validate/vet the thumbnails, select them and either dragndrop them to the right folder or press a button which moves them over. The button will need to be implemented too. Can anyone advise on the starting point for this? So far, Ive spent days sifting through examples from the forum, esp. GUI ones, on the web, checking out Koda and GUIBuilder etc, searching the forum for ref to thumbnails, etc ( I bet there is one there which Ive overlooked, and it turns out to be the perfect topic/post, boooo). Don't know where to start really. Plz plz plz, can anyone help Kind Regards TT also... I'm thinking... isn't there a way to use Windows Explorer to view thumbnails, sort of have a pane in an AutoIt GUI then houses a windows explorer pane, thereby retaining all the functionality of windows explorer, e.g. filmstrip, thumbnails, etc Johannes, can you expand a little bit more on the activex element you mentioned above. Cheers. Edited January 3, 2007 by tonyology
jlorenz1 Posted January 3, 2007 Author Posted January 3, 2007 Many thanks Johannes for that speedy replyFirstly, don't you hate those newbies that come in and always start a post with the phrase..."I'm new to programming, can you please... "I do, but alas, here goes...I'm new to programming, , well programming with AutoIt anyway, so to start, a brief, semi technical desc of the program i want to implementI want to design a simple slideshow app which incorporates 2 panes, left and right to view thumbnails of pictures. The left is an input pane, and the right an output.The left is a directory/folder where user can Bluetooth images to, and show up as thumbnails, so that I can validate/vet the thumbnails, select them and either dragndrop them to the right folder or press a button which moves them over. The button will need to be implemented too.Can anyone advise on the starting point for this?So far, Ive spent days sifting through examples from the forum, esp. GUI ones, on the web, checking out Koda and GUIBuilder etc, searching the forum for ref to thumbnails, etc ( I bet there is one there which Ive overlooked, and it turns out to be the perfect topic/post, boooo).Don't know where to start really.Plz plz plz, can anyone helpKind RegardsTTalso...I'm thinking... isn't there a way to use Windows Explorer to view thumbnails, sort of have a pane in an AutoIt GUI then houses a windows explorer pane, thereby retaining all the functionality of windows explorer, e.g. filmstrip, thumbnails, etcJohannes, can you expand a little bit more on the activex element you mentioned above. Cheers.Hi TT,I haven't much. Here is script. You can choose a folder,and find in a combo box all JPG and GIFs in this folder. If you clicked them in teh combobox, it will showes in the preview on the right side. Good luck Johanneswiki.zip Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post]
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