Sometimes I’m searching for a recipe to some obscure Linux tool and finding my own answers on Stackoverflow from ten years ago.
Sometimes I’m searching for a recipe to some obscure Linux tool and finding my own answers on Stackoverflow from ten years ago.
Saving arbitrary metadata is the exact use case for pickle
module, you just put it together with your numpy array into a tuple. jpeg format has support for storing metadata, but they are an afterthought like .mp3 tags, half of applications do not support them.
I can imagine multichannel jpeg to be used in photo editing software, so you can effortlessly create false-color plots of your infrared data, maybe even apply a beauty filter to your Eagle Nebula microwave scans.
What, pickle.dump
your enormous Numpy array not good enough for you anymore? Not even fancy zlib.compress(pickle.dumps(enormousNumpyArray))
will satisfy you? Are you a scientist or a spectral data photographer?
It’s a basic GIMP knowledge, really. Don’t forget to add an alpha channel to your layer after step 2, otherwise it won’t work.
It’s way less expensive for state-sponsored hackers to blackmail your country’s official to leak backdoor keys than try to break the unbreakable crypto using a nuclear-powered GPU farm.