Getting image properties

How can I get heigth and width of an image file?
It's possible to do without ImageMagick or other third libraries??

Thank you very much

You will need to know the image file type, ie., jpeg or whatever.
Next, you need to find file format information on that file type over here:

http://www.wotsit.org

then develop code based on knowing the format to get the information you want.

IMO you are better off using a shared library that has already worked out all of the details, in this case, libjpeg.so.

I built a program to do this once, which I called imgstat. It requires the SDL and SDL_image libraries, and supports whatever image types SDL_image is compiled with. If you're interested I can post the source.

We are both sending you the same message: use libraries. Corona688 even has offered code - I'd go for it.