[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Image Loading in Crystal Space (was Re: Tools)



On Mon, 10 Jan 2000, Jorrit Tyberghein wrote:

>To load an image in CS (regardless of format) you do:
>
>    // Assume 'buf' points to the file data (can be read in with fopen/fread
>    // or just be allocated in memory somewhere) and 'size' is the size
>    // of that buffer.
>    csImageFile* image_file = csImageLoader::load (buf, size);
>
>This function will detect the format and then load the image in RGB format.
>You can then call things like GetImageData(), GetWidth(), GetHeight(), ...
>and so on.

Ok, I'll get the sources and try to find those classes. Thanks for the
hint!

---------------------+------------------------------------------------------
 Jan 'Chakie' Ekholm |    CS at Åbo Akademi University, Turku, Finland
    Linux Inside     | I'm the blue screen of death, no-one hears you scream