Jump to content
Mbee

Can anyone help me with trancexx's GIFAnimation UDF?

Recommended Posts

Mbee

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!

Share this post


Link to post
Share on other sites
AutoBert

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.

Share this post


Link to post
Share on other sites
Mbee

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 by Mbee

Share this post


Link to post
Share on other sites
AutoBert

@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?

Share this post


Link to post
Share on other sites
Mbee

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!

Share this post


Link to post
Share on other sites
AutoBert

 

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

 

Share this post


Link to post
Share on other sites
UEZ

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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
Mbee

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!

 

Share this post


Link to post
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

×