@Jose
It doesnt have to be that hard.
Here is some code that forms the ImageLoader class for the AmigaOS implementation of my OOP framework. Sorry it's C++, but at the same time you will see the OS functions you need. They are
NewDTObject( ) - creates a new (datatype) object (specified as a filename which is really handy!)
GetDTAttrs( ) - gets attributes of the object, in this case writing the bitmap data into a struct BitMapHeader and so on.
DoMethod( ) - invokes a method of the object - in this case PDTM_READPIXELARRAY which I use to get the raw RGB data out of my datatype, storing it in my own ImageBuffer object (which is a simply chunky pixel raster type thing).
DisposeDTObject( ) - destroys the datatype object once your'e done with it.
It's not as hard as it looks - I myself had to ask here originally for an example also (can't find the thread, but it must be here some place).
As for speed, it is highly subjective. 680x0 apps on my system can load jpegs in a flash since the decoding is using PPC ;-)