Since you have not defined what “send over the network” means, it’s hard to give specific advice.
However, if you want to send an image without loss (or with less loss than has already happened), I don’t think you can compress much more, because JPEG is already compressed. It uses lossy compression, so if you increase JPEG compression, you lose details (although maybe not the ones you would notice, because they are based on non-pixel frequencies)
If you just need to send over the network, why not just open the InputStream, and spool data directly to the network?
Hope this helps - if you can provide more details, I will update the answer.
Best wishes,
Phil Lello
source share