yii framework

I new to yii framework can anyone tell me how to compare height and width with image height and width so that after comparing both height and width user can save image???/

how to display image in CGridView please answer?

refer this

http://www.yiiframework.com/wiki/278/cgridview-render-customized-complex-datacolumns

this