Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to display a graphic ?

Status
Not open for further replies.

subra

Programmer
Aug 6, 2000
45
IN
i would like to know how i can display a graphic using c. i am a new c programmer. i am writing a program to search a database containing records and i want to display the scanned vouchers pertaining to the record selected by the user. Is there some library where such a feature is available? It should be simple. The pictures will be black and white. Which is the best format to store them so that the saved files are small and yet display with adequate detail? Can anyone help or point me to the correct links.

Thanks. if you find this useful let me know at vksubra@usa.net
 
Okay there are 3 solutions :

Are u programming in DOS ? Then use the graphics.h library. U however cannot display images of any picture format.


Are u programming on the Unix Console ? Then use the curses library. This has utilities like making boxes, lines, and stuff. give a "man curses". U however cannot display images of any picture format.

If u want to display them on the Unix Desktop environment, u will have to use Motif calls, u can only display B/w bitmap images (.xbm extension)
 
Dear The Great,

Sorry

I want to use plain DOS. I am using Turbo C 3.0 to compile my programs. i do not want anything fancy. i just want some simple function which will display the bmp file at a specified location on the screen. Nothing complex please. I am a beginner.

thank you

subra if you find this useful let me know at vksubra@usa.net
 
Such functions doesn't exist for DOS compillers. You must know the structure of binary file. Do you want some more information on theyrs structure? John Fill
1c.bmp


ivfmd@mail.md
 
Yes, you can use graphics.h in Turboc. See the help for initgraph(). This functions used to initialize graphics mode. You can print BMP Images, If know the internal format of the images, then you can do it for all.

Maniraja S
 
What I told is about graphics file formats. Please understand me correct. I know about BGI, but it doesn't have graphics file support. To display a mbp for example, you should access file directly. John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top