Jump to content

Looking for UDF - Gif, Jpgs as preview/thumbnails in GUI?


jlorenz1
 Share

Recommended Posts

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]

Link to comment
Share on other sites

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 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
Link to comment
Share on other sites

Neither have I a direct solution... but :D ...

i learned that with imagemagick you can do real magic to images (blabla :P )...

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
Link to comment
Share on other sites

  • 2 weeks later...

Thanks JoshDB and all I will try it jlorenz1@web.de :P

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! :D

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]

Link to comment
Share on other sites

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, :P , 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 by tonyology
Link to comment
Share on other sites

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, :P , 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.

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 Johannes

wiki.zip

Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...