fork from http://www.yiiframework.com/extension/image