For Programmers: Free Programming Magazines  


Home > Archive > Tcl > April 2007 > Pixane and Tkvideo compatibility









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Pixane and Tkvideo compatibility
Tietronix Optics

2007-04-24, 10:06 pm

Hi everyone!
I use tkvideo package to display a video frame into an etcl
interpreter.
Using "picture" option to make a snapshot, I want to save the result
into a bmp file.
The problem is I am using the "etcl" interpreter, where the function
"image write" is not working properly.
Instead, there is the Pixane package which works fine to open an
image, display it, and save it into several formats. Here is my
question :

How to import a tk photo image ( output format of the picture
"function" of tkvideo) into a pixane image format ? I have to import
this to save the command using a syntaxe like:

source code :
1) set img [$videoFrameId picture] , where videoFrameId is the
tkvideo widget idea.
2) Convert tk photo to pixane photo... ? img->p
3) Save image into file :
set filename "C:/temp/test."
set ext "bmp"
pixane save $p -file $filename$ext -format $ext


Thanks a lot for your help!
Cedric

Eric Hassold

2007-04-25, 8:06 am

Hi Cedric,

Tietronix Optics wrote :
> Hi everyone!
> I use tkvideo package to display a video frame into an etcl
> interpreter.
> Using "picture" option to make a snapshot, I want to save the result
> into a bmp file.
> The problem is I am using the "etcl" interpreter, where the function
> "image write" is not working properly.


You're right. Most recent releases have an error in our TkPhoto saving
callback (while pixane saving works fine), which always raises a blank
error. This has been fixed as soon has it has been reported to us, a
couple of ws ago, and is part of 1.0-rc18, which should be available
for download in the next days. If you wish so, and tell me which
platform you are working with, I may send you a link to download a
snapshot release.

> Instead, there is the Pixane package which works fine to open an
> image, display it, and save it into several formats. Here is my
> question :
>
> How to import a tk photo image ( output format of the picture
> "function" of tkvideo) into a pixane image format ?


There is a "pixcopy" comamnd, which first was used to quickly convert a
pixane image into a Tk photo, but which is now also able to do the
opposite. But here again, this is an 1.0-rc18 addon.

Sorry for annoyance, and hope next release will offer all the
functionalities you need. Don't hesitate to report bugs or suggestions.

Eric

-----
Eric Hassold
Evolane - http://www.evolane.com/
Pat Thoyts

2007-04-25, 7:07 pm

Tietronix Optics <cbernard@tietronix-optics.com> writes:

>Hi everyone!
>I use tkvideo package to display a video frame into an etcl
>interpreter.
>Using "picture" option to make a snapshot, I want to save the result
>into a bmp file.
>The problem is I am using the "etcl" interpreter, where the function
>"image write" is not working properly.
>Instead, there is the Pixane package which works fine to open an
>image, display it, and save it into several formats. Here is my
>question :
>
>How to import a tk photo image ( output format of the picture
>"function" of tkvideo) into a pixane image format ? I have to import
>this to save the command using a syntaxe like:
>
>source code :
>1) set img [$videoFrameId picture] , where videoFrameId is the
>tkvideo widget idea.
>2) Convert tk photo to pixane photo... ? img->p
>3) Save image into file :
> set filename "C:/temp/test."
> set ext "bmp"
> pixane save $p -file $filename$ext -format $ext


The data is originally captured in the tkvideo widget as bitmap data
and is converted to a Tk photo as that makes most sense to a Tk
program. It seems like you could do with an option to have it just
return bitmap data directly or perhaps to take a filename?
Maybe [$tkvideo picture -output image.bmp] ?
Or possibly we can just let the etcl guys give you a fixed version
after all. If the image conversion is looking expensive then raise an
enhancement on the berlios page for the tkvideo widget.
--
Pat Thoyts http://www.patthoyts.tk/
To reply, rot13 the return address or read the X-Address header.
PGP fingerprint 2C 6E 98 07 2C 59 C8 97 10 CE 11 E6 04 E0 B9 DD
Tietronix Optics

2007-04-26, 8:06 am

On 25 avr, 14:12, Eric Hassold <hass...@evolane.com> wrote:
> Hi Cedric,
>
> TietronixOptics wrote :
>
>
> You're right. Most recent releases have an error in our TkPhoto saving
> callback (while pixane saving works fine), which always raises a blank
> error. This has been fixed as soon has it has been reported to us, a
> couple of ws ago, and is part of 1.0-rc18, which should be available
> for download in the next days. If you wish so, and tell me which
> platform you are working with, I may send you a link to download a
> snapshot release.
>
>
>
> There is a "pixcopy" comamnd, which first was used to quickly convert a
> pixane image into a Tk photo, but which is now also able to do the
> opposite. But here again, this is an 1.0-rc18 addon.
>
> Sorry for annoyance, and hope next release will offer all the
> functionalities you need. Don't hesitate to report bugs or suggestions.
>
> Eric
>
> -----
> Eric Hassold
> Evolane -http://www.evolane.com/


Hi everyone,
Thanks a lot for your help.
Tkvideo don't have an output option for the picture command to save
the bmp file.
I am using Windows XP OS. That woul be greate and very helpful if you
can provide me link where I could download the 1.0-rc18 release.
Best regards,
Cedric

Eric Hassold

2007-04-26, 7:08 pm

Tietronix Optics wrote :

> ...
> Hi everyone,
> Thanks a lot for your help.
> Tkvideo don't have an output option for the picture command to save
> the bmp file.
> I am using Windows XP OS. That woul be greate and very helpful if you
> can provide me link where I could download the 1.0-rc18 release.
> Best regards,
> Cedric
>


I made latest build from svn snapshot available for download as:
http://www.evolane.com/download/dev...dev20070426.zip

Most important new features take place into pixane module (including of
course fix for problem your reported when saving images from Tk photo
into any Pixane supported format). Many packages have been updated
(sqlite, tkhtml, etc...). Win32 version also integrates several fixes
specific to Vista platfrom (e.g. per-user file association, native theme
in Tile). This has not been tested yet, so your feedback is much
appreciated.

If it passes our test suite on all platforms (Windows Mobile target has
received several important new features, which need careful validation),
you may expect an official 1.0-rc18 release early next w.

Regards,

Eric

-----
Eric Hassold
Evolane - http://www.evolane.com/
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com