in reply to Re^2: Tk:Photo -data with binary data?
in thread Tk:Photo -data with binary data?
IMAGE FORMATS The photo image code is structured to allow handlers for additiona +l image file formats to be added easily. The photo image code mainta +ins a list of these handlers. Handlers are added to the list by register +ing them with a call to Tk_CreatePhotoImageFormat. The standard Tk distribution comes with handlers for XBM, XPM, BMP, JPEG, PNG and PPM/PGM formats, which are automatically registered on initializat +ion.
and in the next paragraph ...
Usually this will find the correct handler, but if it doesn't, the user may give a format name with the -format option to specify which handler to use.
I'm assuming you know what the image format is of the image you have in memory. Why not just try displaying the image yourself? As the Tk documentation illustrates, you can use:
my $img = $mw->Photo(-data => $data);
and if necessary supply -format => FORMAT (for one of the valid IMAGE FORMATS above).
Have you tried doing that yet?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Tk:Photo -data with binary data?
by BrowserUk (Patriarch) on Nov 28, 2006 at 23:38 UTC |