code: def _validate_nonzero_image_size(self, nrows, ncols, component_index):
          
          if nrows == 0 or ncols == 0:
              # Letting this situation continue would segfault openjpeg.
              msg = "Component {0} has dimensions {1} x {2}"
              msg = msg.format(component_index, nrows, ncols)
              raise IOError(msg)
docs: The image cannot have area of zero.