pygobject / pgi-docgen

API Documentation Generator for PyGObject
https://lazka.github.io/pgi-docs/
GNU Lesser General Public License v2.1
128 stars 36 forks source link

BUG: api/GExiv2_0.4/classes/Metadata #28

Closed Tzaphkiel closed 10 years ago

Tzaphkiel commented 10 years ago

As I don't have a bugzilla acocunt so I report it here for the time being.

calling :

meta = GExiv2.Metadata(filepath)
print "Iso: {:d}".format(meta.get_iso_speed())
print "Aperture: f/{:.1f}".format(meta.get_fnumber())

yields the same value. The fnumber returns the Iso value for some reason.

The image data is sound because when I get the Aperture with

meta.get("Exif.Photo.MaxApertureValue")

I get the correct value.

The code is referencing the wrong exif tag name:

gdouble gexiv2_metadata_get_fnumber (GExiv2Metadata *self) {
    g_return_val_if_fail(GEXIV2_IS_METADATA (self), -1.0);
    g_return_val_if_fail(self->priv->image.get() != NULL, -1.0);

    gint nom;
    gint den;
    if ( ! gexiv2_metadata_get_exif_tag_rational (self, "Exif.Photo.ISOSpeedRatings", &nom, &den))
        return -1.0;

    if (den == 0.0)
        return -1.0;

    return (nom / den);
}
lazka commented 10 years ago

Thanks for detailed report, but this project is only about the python api doc generation and there is no chance that any GExiv maintainer will see this.

Please file a report here: https://bugzilla.gnome.org/enter_bug.cgi?product=gexiv2

Tzaphkiel commented 10 years ago

Apologies for that, I have just done so: https://bugzilla.gnome.org/show_bug.cgi?id=722406