-(UIImage *)getImageFromImage:(UIImage *)img{
UIImage* smallImage =img;
CGRect myImageRect = CGRectMake(0,0, self.view.bounds.size.width,300);
UIImage* bigImage= smallImage;
CGImageRef bigImageref = bigImage.CGImage;
CGImageRef imageRef = CGImageCreateWithImageInRect(bigImageref, myImageRect);
UIImage *thumbScale = [UIImage imageWithCGImage:imageRef];
return thumbScale;
}