I have large jpeg or png. Lets say its 5000x5000. I don't want to read whole image because I'll get 'out of memory' exception. Instead I would like to get some smaller part of the picture - lets say 500x500. The part should be chosen dynamically - i can't predict the size and which fragment of the picture i would like to get. Is it possible to get the chosen part of an picture without reading the whole file into memory?