Just an idea... If the resizing sizes are known, and always the same... maybe it could be a good idea to generate a new file for each dimension...
I'm thinking about user-portraits, for instance, having a "photo.jpg" original file, let' say 1024x768 pixels, you could create other 4 files: medium, small, thumbnail and square versions: photo-m.jpg, photo-s.jpg, photo-t.jpg, photo-sq.jpg