svg external bitmap

This patch enables saving bitmaps in svg as external files, so as to reduce output size and rendering costs, and allow easier post-processing of bitmaps.

Currently only DCT images can be saved as jpg, other images are still embedded in svg.

Sorry I misunderstood your words, you were right.
`null` is irrelevant, I mean one call of this function is (0,1), which turned out to be `null`, the other call with (0,2), with which we will find something. Then this function will behave the same.