diff --git a/exif.class.php b/exif.class.php
index 0221a4d..e41a668 100644
--- a/exif.class.php
+++ b/exif.class.php
@@ -175,6 +175,9 @@ Class Exif {
        if ($top == 1) {
          $value = '1/' . $bottom;
        }
+       elseif ($top == 0){
+	       $value = 0;
+       }
        else {
          $value = '1/' . round(($bottom / $top) ,0);
        }
