fixed memory leak : when generating thumbnails, the images where staying in memory for too long, now they are disposed as soon as thmb is generated