Currently we can only read images in a specific format, but writing them is also important.
A possibility is to abstract this away into a ImageWriter or ImageFile abstract class, where a subclass per image format exists. An instance can then be made to write to an arbitrary file or just return a ubyte[].
Another option is to separate the different image formats into separate, but very similar APIs (much like image loading), possibly with a common metadata format. This would mean we could also supply metadata alongside loading images.
Currently we can only read images in a specific format, but writing them is also important.
A possibility is to abstract this away into a
ImageWriter
orImageFile
abstract class, where a subclass per image format exists. An instance can then be made to write to an arbitrary file or just return aubyte[]
.Another option is to separate the different image formats into separate, but very similar APIs (much like image loading), possibly with a common metadata format. This would mean we could also supply metadata alongside loading images.