Find the answer to your Linux question:
Results 1 to 4 of 4
Hi all ! now i have a image jpeg type. I want to make a programing get that image from PC and display it on window. This window I created ...
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Posts
    7

    display image by Xlib

    Hi all !

    now i have a image jpeg type. I want to make a programing get that image from PC and display it on
    window. This window I created by Xlib. If anyone has some command to do that. please help me.
    thanks.

  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    If you really want to do this by means of XLib, you need to decompress the .jpg to raw pixels in memory first. For example, with the library of the Independent JPEG Group or from ImageMagick.

    Then you create an offscreen X pixmap and put it on the screen with PutImage.
    Debian GNU/Linux -- You know you want it.

  3. #3
    Just Joined!
    Join Date
    Dec 2009
    Posts
    7
    thanks GNU-Fan
    I will try to your way.
    But now I consider an image to be a file .jpeg. And I want to ask you that, can i use function XrmGetFileDatabase (filenam) -(To retrieve a database from disk ) to get a file .jpeg?. but to do that, i have to use fuction Xrmsetdatabase , then use function XrmPutFileDatabase(filename) -(To store a copy of a database to disk ) . How do you see?

    can anyone give me a advice for my idea? thanks a lot for all.

  4. #4
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    The way with XrmGetFileDatabase etc. seems like a very tedious one to me.
    You really should consider using the ImageMagick library.
    Debian GNU/Linux -- You know you want it.

Posting Permissions

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