LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-09-2011, 06:28 PM   #1
leistebien
LQ Newbie
 
Registered: Oct 2011
Posts: 2

Rep: Reputation: Disabled
Read and display an image with Xlib


Hi all,

I would like to read a PPM or BMP image (or just any other format) from a file and display it in a Xlib window. Is there any way to do this ?

Links with examples or snipplets are very much welcome !

Many thanks in advance.
L
 
Old 10-09-2011, 07:46 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Imagemagick can display all common image format files, as well as a host of other image processing. The 'display' tool is the one you want. Imagemagick is probably available as part of most distro repositories.
--- rod.

Last edited by theNbomr; 10-09-2011 at 07:47 PM.
 
Old 10-10-2011, 05:36 AM   #3
leistebien
LQ Newbie
 
Registered: Oct 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hi, Im actually looking for programming it myself in C / C++ with Xlib, i.e. programatically rather than using command line.
 
Old 10-10-2011, 12:28 PM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
I think Imagemagick also provides a C language API library that implements most of it's functionality.

--- rod.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to read the state by using _NET_WM_STATE in xlib hamedhsn Programming 6 10-15-2010 02:12 AM
Can't get Xlib window to display tron_thomas Programming 10 03-14-2009 03:24 PM
Writing out an XLib window to an image? siepmann Programming 4 06-07-2007 06:32 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration