It could be done, but here are a couple of reasons why you won't want to.
- It would require you to find, read and understand the jpg file format, plus all it's many variations.
- It would be horribly slow. (I mean it. Really, really, really slow!)
So now the standard question: why would you want to not use the available modules?
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.