Re: error loading pixmap from HD

View: New views
1 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: error loading pixmap from HD

by Alan Coopersmith :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

XReadBitmapFile can only read *.xbm format bitmaps (i.e. 1-bit-per-pixel)
not multi-color pixmaps of any form.   libXpm offers equivalent functionality
for *.xpm pixmap files.    Other libraries from other projects provide
support for reading more advanced graphics formats.

        -Alan Coopersmith-           alan.coopersmith@...
         Sun Microsystems, Inc. - X Window System Engineering

Sotirios Karavarsamis wrote:

> Hello,
>
> I am currently trying to load an image from disk and splash it on
> screen using XCopyArea(), and in the
> following snippet to perform the loading step:
>
>     res = XReadBitmapFile(display, win, BMP_TILE_BLOCKS, &w, &h,
> &game->platform->bmpTiles, &x_hot, &y_hot);
>
>     switch (res)
>     {
>     case BitmapOpenFailed:
> printf("bitmap open failed\n");
> break;
>     case BitmapFileInvalid:
> printf("bitmap invalid file\n");
> break;
>     case BitmapNoMemory:
> printf("bitmap no memory!\n");
> break;
>     case BitmapSuccess:
> printf("bitmap success\n");
>     default:
> printf("other error status\n");
> break;
>     }
>
> I am constantly getting a "bitmap invalid file" error (case #2 in the
> above switch control). In the snippet above, the constant
> BMP_TILE_BLOCKS is a string representing the path to a PBM/XPM/BMP
> file on disk. However, neither image format works. How should I
> correctly load the image file from disk? Or I am I scrueing something
> in the snippet itself? Also, which image formats work correctly with
> this particular function?
>
> I am looking forward to your reply.
>
> A many thank you in advance,
> Sotiris Karavarsamis
> Computer Science Department, UOI
> _______________________________________________
> xorg-devel mailing list
> xorg-devel@...
> http://lists.x.org/mailman/listinfo/xorg-devel

_______________________________________________
xorg mailing list
xorg@...
http://lists.freedesktop.org/mailman/listinfo/xorg