[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
Moderator: | STAR::VATNE |
|
Created: | Mon Oct 30 1989 |
Last Modified: | Mon Dec 31 1990 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3726 |
Total number of notes: | 19516 |
987.0. "XReadBitmap problem" by EPIK::J_JOSEPH (Have you seen Jack in the Green) Tue Jun 20 1989 16:33
I am using the routine XReadBitmapFile to read in an X11 bitmap file. The
problem I have shows up when the bitmap is larger than the screen. In my case,
I have a bitmap file which is 1280 x 1024, and the screen is 1024 x 864. The
call to XReadBitmapFile returns a status of BitmabSuccess, but though I don't
do anything with the returned pixmap afterwards, I get the following string of
errors. As I recall, the max pixmap size one is allowed to create is bounded
by the size of the screen.
BadAlloc - insufficient resources
BadDrawable - parameter not a Pixmap or Window
BadDrawable - parameter not a Pixmap or Window
BadDrawable - parameter not a Pixmap or Window
BadDrawable - parameter not a Pixmap or Window
BadDrawable - parameter not a Pixmap or Window
BadDrawable - parameter not a Pixmap or Window
BadDrawable - parameter not a Pixmap or Window
BadDrawable - parameter not a Pixmap or Window
BadDrawable - parameter not a Pixmap or Window
BadDrawable - parameter not a Pixmap or Window
BadDrawable - parameter not a Pixmap or Window
BadDrawable - parameter not a Pixmap or Window
BadGC - parameter not a GC
BadPixmap - parameter not a Pixmap
The last, presumably, when I destroy the pixmap, which is not set to 0, but I
have a feeling is just pointing at garbage.
Does anyone know if there is a good way to look at the width, height of the
bitmap in the file before attempting to read it with XReadBitmapFile. Or a
way to get the bitmap into an XImage structure. I'm looking for a way to
avoid these errors.
Thanks.
-Jonathan
T.R | Title | User | Personal Name | Date | Lines |
---|
987.1 | | PSW::WINALSKI | Careful with that VAX, Eugene | Thu Jun 22 1989 19:18 | 8 |
| You will have to open, read, and parse the bitmap file yourself. There is code
to do this in Xfish. Look at file PSW::PSW$DUA1:[WINALSKI.FISH]FISH.C. In
particular, look at XCreatePixmapFromBitmapFile. This is a routine that is
identical to XCreateBitmapFromFile, except it creates a pixmap of default depth
instead of a bitmap. The routine processes a bitmap file "by hand."
--PSW
|