LOOM-JPEGPLUSPLUS: need the file reading stuff too, but probably needs to be modified to handle buffers