How to Load image using axapta x++ code


 void loadImage()  
 {  
 Image img;  
 CompanyImage companyImage;  
 ;  
 companyImage = CompanyImage::find(InventTable.dataAreaId,InventTable.TableId,InventTable.RecId);  
 if (companyImage.Image)  
 {  
 img = new Image();  
 img.setData(companyImage.Image);  
 ItemImage.image(img);  
 }  
 else  
 {  
 ItemImage.image(null);  
 }  
 }