Project

General

Profile

Bug #935 » bug935.diff

Jehan Pagès, 22 Aug 2015 10:20

View differences:

src/tags.cpp (working copy)
2464 2464
    std::ostream& print0x829a(std::ostream& os, const Value& value, const ExifData*)
2465 2465
    {
2466 2466
        Rational t = value.toRational();
2467
        if (t.first > 1 && t.second > 1 && t.second >= t.first) {
2468
            t.second = static_cast<uint32_t>(
2469
                static_cast<float>(t.second) / t.first + 0.5);
2470
            t.first = 1;
2471
        }
2472
        if (t.second > 1 && t.second < t.first) {
2473
            t.first = static_cast<uint32_t>(
2474
                static_cast<float>(t.first) / t.second + 0.5);
2475
            t.second = 1;
2476
        }
2477 2467
        if (t.second == 1) {
2478 2468
            os << t.first << " s";
2479 2469
        }
(2-2/2)