pano_trafo doesn't flush output, mixed use of C i/o and streams

Bug #695068 reported by KFJ
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Hugin
Fix Released
High
Unassigned

Bug Description

Hi all!

I've had an issue with pano_trafo: The output of the transformed coordinates wasn't flushed after each line, so I couldn't use it with a pipe on the output end from a Python process; the output just wouldn't come. I noticed that the source mixed C-style calls to fprintf() etc. with C++ stream i/o, which, if I am not mistaken, is considered prone to malfunction. Replacing the C-style i/o with stream i/o solved the problem for me.

At the same time I found it problematic to be limited to working on only one image at a time, since I wanted to work on control points. I extended pano_trafo to also work without the image number passed on the command line: If it doesn't receive the image number on the command line, it expects input in the form of triplets <image nr> <x> <y>

My hugin version is Pre-Release 2010.5.0.687a025dd22f, self-built on Kubuntu 10.10.

Find enclosed a patch which reflects my modifications; I hope I did it right ;-)

With regards
Kay

Revision history for this message
KFJ (kfj) wrote :
Yuv (yuv)
Changed in hugin:
status: New → Confirmed
importance: Undecided → High
Yuv (yuv)
Changed in hugin:
status: Confirmed → Fix Committed
Yuv (yuv)
Changed in hugin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.