C++ library for images
This is a simple library mainly designed for image creation, but it can also read simple images format. With this tool you can create an image using several drawing functions:
There are also some utility functions for upscaling, blurring and more.
For the moment the library can only write (and read) bitmap image formats, but the author is working to the png file format implementation. For write and read the images in the png format. When the library will be able to write a png image file the project will be renamed in Simple Image Library (SIL)
and will be relased the first version, the v1.0
.
The author is very busy with academic obligation so updates in this projct are not so often...
To use the class include the "Image.hpp
" header file (inside the include
folder, other header files in this folder are necessary):
#include "Image.hpp" // include the Image class
int main()
{
Image img(800,600); // create an 800x600 pixels image
img.clear(255,255,255); // set all pixels to white
img.line(0,0,800,600); // draw a diagonal line on the image
img.save_bmp("image.bmp"); // save image as 24-bit Bitmap file
}
It can be used also the single header-file Image.h
which includes all the separated nested header files. This file is generated through the automated software header-merger
developed by me.
For other, more complex, examples please see examples
folder.
For the moment this todo list is written in italian. As far as the first contributor comes I'll translate in English.
PNG
. Dato che pesano meno dei bmp e vengono lette senza problemi da LaTeX (al contrario dei bitmap). Se inserisco il modo di gestire altri formati questo repository invece di "Bitmap" dovrebbe chiamarsi "Image"PNG
e i JPG
devo cambiare nome al repository in Imageimage
(mancano l'arco di cerchio, le splines [Per le splines usare il metodo di Cutmann, vedere come ho fatto in DOS] etc.)flood-fill
delle figure (studiare bene come fare)SIL
(Simple Image Library)?? Anche BIL
(Basic Image Library) è carino e anche simpaticoffmpeg
)HPlotter
che usa SIL per stampare i grafici in png