Changed File::img() logic.

Signed-off-by: SeynovAM <sejnovalexey@gmail.com>