libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GdkCRNPixbuf.h
Go to the documentation of this file.
1 /* Copyright 2010-2016 CoReNum, INSA-Lyon
2  *
3  * This file is part of libgtkcrnmm.
4  *
5  * libgtkcrnmm is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * libgtkcrnmm is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with libgtkcrnmm. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * file: GdkCRNPixbuf.h
19  * \author Yann LEYDIER
20  */
21 
22 #ifndef GdkCRNPixbuf_HEADER
23 #define GdkCRNPixbuf_HEADER
24 
25 #include <libgtkcrnmm_config.h>
26 #include <gtkmm.h>
27 #include <CRNImage/CRNImage.h>
28 #include <CRNImage/CRNPixel.h>
29 
32 namespace GdkCRN
33 {
36  Glib::RefPtr<Gdk::Pixbuf> PixbufFromCRNImage(const crn::ImageBase &img);
39  Glib::RefPtr<Gdk::Pixbuf> PixbufFromFile(const crn::Path &p);
42  crn::ImageRGB CRNImageFromPixbuf(const Glib::RefPtr<Gdk::Pixbuf> &pb);
43 
44 #ifdef CRN_USING_GTKMM3
45 
47  Gdk::RGBA ColorFromCRNPixel(const crn::pixel::RGB8 &p);
50  crn::pixel::RGB8 CRNPixelRGBFromGdkColor(const Gdk::RGBA &color);
51 #else
52 
54  Gdk::Color ColorFromCRNPixel(const crn::pixel::RGB8 &p);
57  crn::pixel::RGB8 CRNPixelRGBFromGdkColor(const Gdk::Color &color);
58 #endif
59 }
60 
61 #endif
62 
63 
Glib::RefPtr< Gdk::Pixbuf > PixbufFromCRNImage(const crn::ImageBase &img)
Creates a Gdk::Pixbuf from a crn::Image.
Abstract class for images.
Definition: CRNImage.h:141
Glib::RefPtr< Gdk::Pixbuf > PixbufFromFile(const crn::Path &p)
Creates a Gdk::Pixbuf from a file.
crn::pixel::RGB8 CRNPixelRGBFromGdkColor(const Gdk::Color &color)
Creates a crn::PixelRGB from a Gdk::Color.
A convenience class for file paths.
Definition: CRNPath.h:39
crn::ImageRGB CRNImageFromPixbuf(const Glib::RefPtr< Gdk::Pixbuf > &pb)
Creates a crn::Image from a Gdk::Pixbuf.
Gdk::Color ColorFromCRNPixel(const crn::pixel::RGB8 &p)
Creates a Gdk::Color from a crn::Pixel.
Base class for images.
Definition: CRNImage.h:46