I there an API function I can call that will tell me the pixel dimensions of a jpeg?

I was thinking along the lines of a 'GetMetrics' type thang, but I can't find anything around...

Could anyone help please?

Mafro