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

I was told( by a Perl/Tk expert) that the Photo object wants base64_encoded data, and the -file=> option, does convert the binary data to base64 internally as it is read from the disk. So I don't think there is anyway around it.

Thanks. That knocks the final nail in my pursuit of a faster method using Tk.

It seems weird to convert the binary data to base 64 though. It must at some point convert it back to binary to manipulate it and set it into the underlying hardware buffer/device context. Passing it through an ascii-based intermediate format is just pure overhead--though that does explain the rather tawdry performance of Tk image manipulations.


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.

Replies are listed 'Best First'.
Re^3: Tk:Photo -data with binary data?
by zentara (Cardinal) on Nov 29, 2006 at 13:31 UTC
    I asked about this once on comp.lang.perl.tk and Steven Lidie replied

    "The reason is described in various pieces of documentation. Tcl/Tk required (still requires?) data in "printable characters", hence the encoding of binary data.".

    I never thought about it, and just took it as one of those truths you just accept and never question. :-)


    I'm not really a human, but I play one on earth. Cogito ergo sum a bum