Mbee Posted June 5, 2016 Share Posted June 5, 2016 There's no way I'm going to PM or email trancexx for help directly, because that would be rude and is highly frowned upon. But I'm stumped and growing more frustrated. Maybe someone else would be so gracious as to help me? If so, please see my post in trancexx's thread on that UDF here. I will be deeply in your debt! Thanks! Link to comment Share on other sites More sharing options...
AutoBert Posted June 5, 2016 Share Posted June 5, 2016 I just downloaded and tested with Example5_DancingOnMyScript.au3 of the GIFAnimation_2.1.2 and it works well. Did the example's work for you? which of the examples fails? Only your own script fails? => Please post script. Link to comment Share on other sites More sharing options...
Mbee Posted June 5, 2016 Author Share Posted June 5, 2016 (edited) Thanks, AutoBert, for your reply! It's certainly true that if you invoke the public functions in the UDF with a file path, everything works just fine. But passing a file every time would be absurdly costly in terms of performance given that those public functions open and read the entire file every time if you pass a file path! So since I need to resize (shrink or enlarge) virtually every image to make it fit in the alloted space in my GUI, to use only those external functions I would need to read each image, resize it, then write out the new image to a file, only to have to read it all back in again! Instead, trancexx coded even those external function calls such that instead of a file path, you can pass some kind of binary data that represents in some unknown way the image that's already in memory, sparing everyone from having to work exclusively with files. But that's the very question I posted in the UDF thread: What, exactly, do I need to pass in for this binary data? It doesn't seem like a bitmap, or a handle to a bitmap, or a pointer to a bitmap -- so what the heck do I pass? I'm not criticizing trancexx in the tiniest little bit; it's rare indeed to see programmers thoroughly comment the internal functions of their UDFs. Nevertheless, I need help answering my question. Thanks again Edited June 5, 2016 by Mbee Link to comment Share on other sites More sharing options...
junkew Posted June 5, 2016 Share Posted June 5, 2016 see FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
AutoBert Posted June 5, 2016 Share Posted June 5, 2016 @junkew: i just tried download in the linked post. It doesn't work. But here is the bugfixed version: GifAnimations_Form_Binary.au3 I added lines 3 + 7 Can a Admin/Mod replace the file in the original post or should i make a post in the thread? Link to comment Share on other sites More sharing options...
Mbee Posted June 6, 2016 Author Share Posted June 6, 2016 Thanks for your replies, junkew and AutoBert, But I downloaded and looked at that code, and perhaps I'm just too stupid, but I can't see anything there relevant to my inquiry. For example, I need to call trancexx's "_GUICtrlCreateGIF()" function, but the code you provided makes no such calls. Might you be willing to elaborate more fully? What, exactly, do I pass in the first paramter of _GUICtrlCreateGIF()? What data type? What object type? Thanks! Link to comment Share on other sites More sharing options...
AutoBert Posted June 6, 2016 Share Posted June 6, 2016 10 hours ago, Mbee said: For example, I need to call trancexx's "_GUICtrlCreateGIF()" function ... What, exactly, do I pass in the first paramter of _GUICtrlCreateGIF()? The FilePath to a existing GIF-File. The GifAnimation_Form_Binary.au3 (i bugfixed) from ptrex don't include Trancexx's GIFAnimation.au3 but is using snipets from internal functions. To do it this way, there is a good knowledge about memory, DLLCalls and GDI/GDI+ needed. My skills aren't good enough to to this. But i know how i can edit it (using a other Binary Gif): AotherGifAnimations_Form_Binary.au3 I used Link to comment Share on other sites More sharing options...
UEZ Posted June 6, 2016 Share Posted June 6, 2016 If I understood correctly you want to resize an image. If so, check out in the help file following two functions: _GDIPlus_ImageResize _GDIPlus_ImageScale Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Mbee Posted June 6, 2016 Author Share Posted June 6, 2016 Okay, I've finally figured it out on my own! I appreciate the replies here, but it seems to me there was some significant misunderstandings of what, exactly, I needed help with. What I needed to know was the type of binary data (data type, object type, whatever) to pass to trancexx's GifAnimation UDF instead of a file path. I tried bitmaps, pointers to bitmaps, handles to bitmaps, stream data, scan0 data, everything I could think of. But even after patiently explaining it several times, I couldn't see the solution in the replies that were kindly offered. And it turns out that the correct answer is: The full raw data returned from a simple binary FileRead()! Ach! Why didn't I think of that earlier? Well, I suppose my main cognitive block was that I more or less considered the GifAnimation UDF able to Do All Things, so I kept reading and re-reading that code (which never documented what binary data to use), expecting to find my answer there. It was there, I suppose, but it was far too obscure for me to grasp. But I've got it now! Thanks to all! 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