#26 pGetTagFromTagPtr divide by zero in line 11917 MFreeImage.bas 3.15.4 VB6 wrapper

None
open
Carsten Klein
None
5
2013-06-09
2013-06-09
Anonymous
No

MFreeImage.bas line 11917 issues a divide by zero in some image cases (one included from Samsung Galaxy S Plus smartphone)

Culprit:
.Value(i) = .RationalValue(i).Numerator / .RationalValue(i).Denominator

Solution:
If (.RationalValue(i).Denominator = 0) Then .Value(i) = 0 Else .Value(i) = .RationalValue(i).Numerator / .RationalValue(i).Denominator

Although I have no idea if .Value(i) should be set to 0 in case of a .RationalValue(i).Denominator = 0...

Hope it helps, good luck!

1 Attachments

Discussion

  • Hervé Drolon
    Hervé Drolon
    2013-06-09

    • assigned_to: Carsten Klein
    • Group: -->
     


Anonymous


Cancel   Add attachments