thekid/rfc — Issue #143: RFC 0143: Image metadata API enhancements
Author: thekid
Created: 2011-10-09 15:22:59+00:00
State: closed
Labels: implemented, rfc

Scope of Change
====
* The fromFile() methods will throw different exceptions for different
cases of errors instead of only an ImagingException.
* There will be an optional default argument to the IptcData::fromFile()
and ExifData::fromFile() methods which will be returned in case no meta
data can be found.
* There will be a public EMPTY field in the ExifData and IptcData classes
which will represent empty instances of the respective class.

Rationale
====
* Be able to distinguish the cases when data cannot be read for I/O errors
and when data is not existant or malformed.
* Make handling of "no metadata found"-situations easier.

Functionality
====

Exceptions
----

```php

```

Optional default argument
----
In case no meta data can be found and a default argument is given this will
be returned instead of throwing an ElementNotFoundException.

```php

```

Security considerations
====
n/a

Speed impact
====
- img.util.ExifData::fromFile() will be slightly slower due to additional
checks being performed before actually extracting the data

Dependencies
====

Related documents
====
- http://xp-framework.net/rfc/contrib/rfc0143.diff
Implementing patch

Comments
====
n/a