Skip to content

Is pixmaps loading working ? #27

@thibaultlanglois

Description

@thibaultlanglois

Hello,
I get an error when trying to load a pixmap image:

The value
  NIL
is not of type
  XLIB:IMAGE
   [Condition of type TYPE-ERROR]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT] abort thread (#<THREAD "repl-thread" RUNNING {10017F0003}>)

Backtrace:
  0: (GEM::X-IMAGE-SIZE #<unused argument> NIL)
  1: (OPAL::DRAW-METHOD-PIXMAP #k<CAT-EYE-IMAGE> #k<MYIMAGE>)

The code:

(defun pixmap1-test ()
  (create-instance 'myimage inter:interactor-window
    (:left 100) (:top 10)
    (:width 700) (:height 500)
    (:title "my window"))
  (create-instance 'topagg opal:aggregate)
  (s-value myimage :aggregate topagg)
  (create-instance 'cat-eye-image opal:pixmap
    :image (opal:read-xpm-file "cat-eye-pixels.xpm"))
  (opal:add-component topagg cat-eye-image)
  (opal:update myimage))

So, am I doing something wrong ? Is it broken ?

The image format seems ok to me:

/* XPM */
static char *dummy[]={
"300 168 121 2",
".j c #000000",
".m c #000011",
"#l c #00001f",
".L c #00002d",
".C c #00031c",

It looks like it is in «meltsner» format.
I read the comments regarding depth/bits-per-pixels in pixmaps.lisp. Is it related to this issue ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions