Ximage and jpg - Motif

This is a discussion on Ximage and jpg - Motif ; Hi,I've a big problem. I'm programming i C a viewer for jpeg images. Now at the end of the process I've got a matrix m[width][height] of pixel where pixel is a structure: struct pixel{ double R,G,B;}. I want to use ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Ximage and jpg

  1. Ximage and jpg

    Hi,I've a big problem.

    I'm programming i C a viewer for jpeg images.

    Now at the end of the process I've got a matrix m[width][height] of
    pixel where pixel is a structure:

    struct pixel{ double R,G,B;}.

    I want to use the function XputImage(), but I need a XImage to use with
    it.

    The problem is that I don't know how to put my pixels in the XImage.
    I think I need to use ZPixmap, but I don't konk the scructure of the
    datas.
    Someone can help me? Maybe with an example.

    Thanks Bye Jack

    PS: sorry for my bad english

  2. Re: Ximage and jpg

    pippo@disney.com (Jack) wrote in news:1gd2tos.ir3j81158zhvkN%
    pippo@disney.com:
    > The problem is that I don't know how to put my pixels in the XImage.
    > I think I need to use ZPixmap, but I don't konk the scructure of the
    > datas.


    Try XPutPixel. It's not super fast, but it is reliable. You can look at the
    source code to find optimizations for your particular source data format.

    Ken Lee, http://www.rahul.net/kenton/

  3. Re: Ximage and jpg

    Ken Lee wrote:

    > Try XPutPixel. It's not super fast, but it is reliable. You can look at the
    > source code to find optimizations for your particular source data format.
    >
    > Ken Lee, http://www.rahul.net/kenton/


    Sorry, I can't find the source code you mentioned.
    And I've looked at the XPutPixel function, but the problem stays because
    I don't know how to put my three double variables (for R, G and B) in
    one unsigned long.

    Thanks Bye Jack

+ Reply to Thread