View Full Version : detecting a pictures dimensions

Aug 7, 2011, 02:54 PM
Hi all,
i was just wondering how to automatically detect a picture's height and width.

[scrollView setContentSize:CGSizeMake(image.size.width, image.size.height)];

Obviously, what i have here doesn't work. Once i push a new View, the image could be any size, and i dont want to hardcode a large scrollView size if it's not needed.

thanks very much in advance