first, many thanks to Kay for his Python pto parser that served as basis for
what follows.
second, a big disclaimer: my Python experience is very limited.
Nevertheless, in about half hour of googling and fiddling, I achieved what I
needed now.
We ask users to provide the pto file associated with bugs reports. Usually
just the pto is enough, so to save time, bandwidth, disk space we do not ask
for the actual images.
As a consequence the first thing that we need to do if we want to visualize a
project in the GUI is to create placeholder images.
This is what the attached script does. Tested in Ubuntu. Requires
ImageMagick, Python, Kay's pto parser and python-argparse
sudo apt-get install imagemagick python python-argparse
bzr branch lp:~kfj/+junk/script
save the script inside script/main (unless Kay adds it to the repo, then it
will come automatically)
call with ptoimggen.py -p <PTO-FILE>
Probably Kay will find plenty of ways to improve on this. More power to him.
I had enough difficulties finding my way around his code - about the same as I
have finding my way around the Hugin source code (hint hint comments hint).
Thank you, Kay!
Yuv
Bruno has similar script in his Panotools-Script. It's called ptodummy [1].
https://answers.launchpad.net/hugin/+question/136883
Roger.
--
** R.E....@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 **
** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement.
Does it sit on the couch all day? Is it unemployed? Please be specific!
Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ
Danke Santa K. ;-)
Indeed I did not realize that I could use line.<param>.value also for reading;
and indeed what you did is what I would have done if I had more time to get
further into it.
I added your updates, and improved it to use JPG images even when the initial
project file was using another image format.
The repo I mentioned is your personal repo on Launchpad (it was in the
checkout instructions for Ubuntu, sorry for not being more verbose).
If Launchpad had a better SCM (bazaar has a very dangerous feature of
automatically adding any new file in the working directory to a commit,
polluting the repo over time) I'd be inclined to migrate also the SCM; but
this is unlikely to happen any time soon.
I was not aware of the Perl script. I did more Perl than Python in the past
and yet I love Python which I find much less cryptic to read and write. So I
am happy to use the Python scripts and contribute what I can to improve them.
Yuv
fixed. do you want to add the script to your repo (I can't and I don't think
you can simply give write access to personal repos like that one)?
> I should have written the docu earlier... well, I suppose it's better
> late than never.
it's very helpful, thank you!
Yuv
it surely is a better place than the oblivion of a mailing list memory. And
it is not so obscure, I found it when I needed it.
If you want a less obscure place, you can start a public project on Launchpad.
Call it Pythorama or PanoPython or PyPTO or whatever name is not taken yet ;-)
It is my honor to have my scribbling sharing repo with your code.
Yuv