added thumbnail image creation with imagedata (NSData)