pano_modify --rotate does not detect values < abs(1) on hugin 2016.0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Hugin |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
If on command line a pano_modify --rotate parameter is given, pano_modify checks for valid values with (pano_modify.cpp, line 745):
if (abs(yaw) + abs(pitch) + abs(roll) > 0.0)
If I'm not mistaken, abs() expects ints and the if-case will therefore return false, if no parameter is > abs(1)
System Information:
Betriebssystem: Linux 4.2.0-23-generic x86_64
Architektur: 64 bit
Freier Speicher: 140012862658896 kiB
Hugin
Version: 2016.0.
Ressourcen-Pfad: /usr/share/
Datenpfad: /usr/share/
Hugins Kamera- und Objektivdatenbank: /home/xxx/
Multi-Threading mittels C++11 std::thread und OpenMP
Bibliotheken
wxWidgets: wxWidgets 3.0
wxWidgets Library (wxGTK port)
Version 3.0.0 (Unicode: wchar_t, debug level: 1),
compiled at Dec 2 2013 15:56:33
Runtime version of toolkit used is 2.24.
Compile-time GTK+ version is 2.24.22.
libpano13: 2.9.19
Boost: 1.54.0
Exiv2: 0.23
SQLite3: 3.8.2
Vigra: 1.10.0
LittleCMS2: 2.5
Changed in hugin: | |
milestone: | none → 2016.2beta1 |
Changed in hugin: | |
status: | Fix Committed → Fix Released |
I downloaded the source and made changes that appear to work for me (2016 branch):
in pano_modify.cpp:
add
#include <math.h>
and replace abs() with fabs()
Slightly off topic, I asked google how to submit a patch but couldn't find an easy answer within the first few minutes.
For future reference, Is there a short and easy way to generate a patch for this rather easy example?
Thanks