Find the answer to your Linux question:
Results 1 to 2 of 2
Hi I've installed Mandrake10 and trying to get an imaging program to work. The image format is complex and I've tried converting but to no avail. The problem is that ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2004
    Location
    england
    Posts
    2

    Xsrv depth problem!


    Hi

    I've installed Mandrake10 and trying to get an imaging program to work. The image format is complex and I've tried converting but to no avail. The problem is that as it creates the window but returns an error as the depth is 24bit not 16:



    blok->window = XCreateWindow(xsrv->display,xsrv->window,0,0,width,height,0,xsrv->depth,
    InputOutput,xsrv->visual,win_att_mask,&win_att);

    and in another program which renders the image:


    /* 16 bit screens */
    if (xsrv->depth == 16) {
    for(xs=0;xs<rndr->width;xs++) { for(ys=0;ys<rndr->height;ys++) {
    /* y-screen co-ord inverted */
    pt = ((rndr->height-ys)*rndr->width+xs)-1;
    ((unsigned short int *)rndr->imgdat)[pt] = map_16bit565_color( im[xs][ys] );
    }}
    }

    /* 24 bit screens */
    if (xsrv->depth == 24) {
    printf("ERRRRRR: Problem at line %d in program %s. Stopping...\n",__LINE__,__FILE__);
    exit(2);


    How can I initialise my window to have a depth of 16bits?

    Any help would be extremely welcome as I'm s'posed to present some of these images on Thursday morning and I'm beginning to panic.

    Thanks

  2. #2
    Linux Engineer
    Join Date
    Jul 2003
    Location
    Stockholm, Sweden
    Posts
    1,296
    alter /etc/X11/XF86Config so that the DefaultDepth is 16 instead of 24 then restart X

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •