Reputation:
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
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
Reputation: 64253
Take a look into ImageMagick, or it's open source alternative GraphicsMagick.
Upvotes: 0
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:
Upvotes: 0
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
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