user379888
user379888

Reputation:

Opening And Saving Graphics Files In C++

I am developing a paint application in C++. The problem that I am facing is that I need to add the option to save and open a graphics file but I have no idea about bitmap images. Is there any other way without creating bitmap images to open and save the graphics file in C++?I am using graphics.h header file. Its old Turbo-C++ and Windows OS.

Thank-you.

Upvotes: 1

Views: 1766

Answers (5)

Paul R
Paul R

Reputation: 213059

You can just use libpng to add support for reading and writing PNG files - it's a cross-platform library and it's free.

You should probably consider ditching Turbo C++ - it's old, doesn't conform to current C++ standards, and is unsupported. Use something a little more up-to-date, like gcc or Visual Studio (Express).

Upvotes: 1

BЈовић
BЈовић

Reputation: 64253

Take a look into ImageMagick, or it's open source alternative GraphicsMagick.

Upvotes: 0

nabulke
nabulke

Reputation: 11275

I can recommend the CXImage library. It is portable (tested on windows/linux), open source and handles a lot of file formats. Check out those links:

CXImage Homepage

CXImage on codeproject

Upvotes: 0

Puppy
Puppy

Reputation: 146968

<graphics.h> is a deprecated header, and has been for fifteen years. You will want to use Direct2D, it is designed for the loading and manipulation of 2D images.

Upvotes: 0

rotoglup
rotoglup

Reputation: 5238

You may have a look at FreeImage or OpenImageIO that do handle multiple bitmap image formats.

Maybe it's not what you're after, as I don't understand what you mean by "without creating bitmap images" ?

Upvotes: 1

Related Questions