Image provider: Support returning encoded image data

This allows the additional use case of reading e.g. PNG tiles from a
database and passing them to Qt without decoding first (see issue #1).