Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-22-2011, 02:03 PM   #1
LQ Newbie
Registered: Sep 2010
Posts: 16

Rep: Reputation: 0
How do i display an image fullscreen in c?

Hi there! I am a beginner C learner and am hoping to find a way to make a program which will show a png from GIMP on the screen in fullscreen mode. I was using GIMP and there is an option to save my image as an .h or .c file. I tried .h and it saves it as some kind of very large variable. I want to call this from my own C program and display it on the screen.

Any help is appreciated. Thanx
Old 01-23-2011, 09:41 AM   #2
LQ 5k Club
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
There is no way to display images directly from C.

You have to use a library that lets you display graphics.

You can use Xlib to directly commuticate with the X Window System (the GUI used by almost all distros today), or if you want something simpler or want to have GUI controls, try toolkits like Qt or GTK+.

There are also more video game-oriented libraries like SDL and Allegro, not sure if they support XPM files.


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
XMAME Fullscreen Display Methods erraticassassin Linux - Games 17 01-24-2012 04:39 PM
Is there a program to display in fullscreen message like in freevo/myth? frenchn00b Linux - Software 2 06-03-2010 04:43 PM
Fullscreen GLUT app, display blanks after approx 30 minutes erick.brown Linux - General 2 04-08-2010 02:20 PM
Good easy Python toolkit for drawing on a fullscreen 2nd display? yodermk Programming 5 08-01-2008 04:27 AM
Display an image in C, fullscreen mic Programming 8 06-01-2008 10:57 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:17 PM.

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