in reply to Tk:Photo -data with binary data?

I don'treally know anything about Tk, but the problem intrigued me ... one thing i noticed is that when i went looking for info about Tk_CreatePhotoImageFormat mentioned as the method for registering image format handlers, I found this man page which indicates that the image format handlers are expected to provide seperate sets of functions for dealing with string data vs file data...

...presumably this is so the handler can use an optimised method for getting the data out of the string or file if it knows a shortcut, but it seems silly to me. Either way: it leads me to suspect that maybe the image format handlers in Perl/Tk only support base64 encoded data in their stringMatchProc ... who knows what the stringReadProc does.

Replies are listed 'Best First'.
Re^2: Tk:Photo -data with binary data?
by BrowserUk (Patriarch) on Nov 29, 2006 at 11:07 UTC

    Thanks. The answer appears to be one of:

    • I'm misreading the docs and it isn't meant to signify that binary data can be read from a string;
    • The Perl docs are basically just ports of the underlying tcl/tk docs, and this particular feature has never been implemented in the perl/tk wrappers.

    It'd be nice to know which it is, but either way, I'll have to look into a Win32::GUI solution to achieve my needs. :(


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      I'll have to look into a Win32::GUI solution to achieve my needs. :(

      Hey! You are breaking the tendency!
      Usually speaking of perl/Tk people tend to say "but Gtk2 is even better", not Win32::GUI!
      :)