Can read_coefficients() somehow support reading an image from the memory?
Like what I asked in the title: can torchjpeg.codec.read_coefficients()
somehow read the jpeg from the memory instead of opening a jpeg file?
I noticed that the actual torchjpeg.codec.read_coefficients()
is implemented in C++, where the image is opened from the file system. I would like to ask whether a functionality similar to jpeg2dct
's loads
function could be supported?
A particular reason for this is that I need a bit of preprocessing of the raw jpeg before sending it to the read_coefficients()
function - which is a bit of a hassle if I save the jpeg and read it again during image preprocessing.
Much appreciated