Loading embedded images

I have an existing application that reads in a design that is a mixture of textual layout commands and embedded images and translates it into the applications standard design form. The OS it currently runs on includes a routine to load a bitmap from a filehandle but as far as I can ascertain QNX only has PxloadImage which insists that a bitmap is a complete file.
Are there functions I am overlooking that can read from an already open file as otherwise I am considering either reading into a temporary file and using Pxloadimage or saving each image as a file named filenameX.bmp where filename is the name of the translated design and X a counter and abandoning the idea of embedded bitmaps in my design files altogether (as obviously I will have to do this on the translated designs if I continue to embed bitmaps or write my own routines to load and convert from black and white to direct 888 format)

There is no such function as far as I know. You need to come up with your own solution. However if all you need to handle is the bitmap format it`s a very easy format to handle and you will find plenty of code on the interthingy to help you out.

PxloadImage does expect the targeted file to be an image file.

You can open a file in some format that you understand which has embedded bitmaps and read them in.
What you want to do next is create a PtImage using the bitmap data. I forget the name of the routine, but just scan the Px routines and you should find it. This is only slightly more complicated than just using PxloadImage. For example, you need to know

  1. pixel width
  2. pixel height
  3. Image format (8 bit, 15 bit, 16 bit, 24 bit, etc)
  4. pixel’s per line (this can be different from pixel width * bytes/pixel)

It should be fairly easy to create a cover routine for all this that you can use instead of PxLoadImage.