Fixed README
[liblqr.git] / lqr / lqr_rwindow_priv.h
blob7f770ea97c38c606881eea4e27b391fac946b05c
1 /* LiquidRescaling Library
2 * Copyright (C) 2007-2009 Carlo Baldassi (the "Author") <carlobaldassi@gmail.com>.
3 * All Rights Reserved.
5 * This library implements the algorithm described in the paper
6 * "Seam Carving for Content-Aware Image Resizing"
7 * by Shai Avidan and Ariel Shamir
8 * which can be found at http://www.faculty.idc.ac.il/arik/imret.pdf
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU Lesser General Public License as published by
12 * the Free Software Foundation; version 3 dated June, 2007.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with this program; if not, see <http://www.gnu.org/licenses/>
23 #ifndef __LQR_READER_WINDOW_PRIV_H__
24 #define __LQR_READER_WINDOW_PRIV_H__
26 #ifndef __LQR_BASE_H__
27 #error "lqr_base.h must be included prior to lqr_rwindow_priv.h"
28 #endif /* __LQR_BASE_H__ */
30 struct _LqrReadingWindow {
31 gdouble **buffer;
32 gint radius;
33 LqrEnergyReaderType read_t;
34 gint channels;
35 gboolean use_rcache;
36 LqrCarver *carver;
37 gint x;
38 gint y;
41 typedef gdouble (*LqrReadFunc) (LqrCarver *, gint, gint);
42 typedef gdouble (*LqrReadFuncWithCh) (LqrCarver *, gint, gint, gint);
43 /* typedef glfoat (*LqrReadFuncAbs) (LqrCarver*, gint, gint, gint, gint); */
45 LqrRetVal lqr_rwindow_fill_std(LqrReadingWindow *rwindow, LqrCarver *r, gint x, gint y);
46 LqrRetVal lqr_rwindow_fill_rgba(LqrReadingWindow *rwindow, LqrCarver *r, gint x, gint y);
47 LqrRetVal lqr_rwindow_fill_custom(LqrReadingWindow *rwindow, LqrCarver *r, gint x, gint y);
48 LqrRetVal lqr_rwindow_fill(LqrReadingWindow *rwindow, LqrCarver *r, gint x, gint y);
50 gdouble lqr_rwindow_read_bright(LqrReadingWindow *rwindow, gint x, gint y);
51 gdouble lqr_rwindow_read_luma(LqrReadingWindow *rwindow, gint x, gint y);
52 gdouble lqr_rwindow_read_rgba(LqrReadingWindow *rwindow, gint x, gint y, gint channel);
53 gdouble lqr_rwindow_read_custom(LqrReadingWindow *rwindow, gint x, gint y, gint channel);
55 LqrReadingWindow *lqr_rwindow_new_std(gint radius, LqrEnergyReaderType read_func_type, gboolean use_rcache);
56 LqrReadingWindow *lqr_rwindow_new_rgba(gint radius, gboolean use_rcache);
57 LqrReadingWindow *lqr_rwindow_new_custom(gint radius, gboolean use_rcache, gint channels);
58 LqrReadingWindow *lqr_rwindow_new(gint radius, LqrEnergyReaderType read_func_type, gboolean use_rcache);
59 void lqr_rwindow_destroy(LqrReadingWindow *rwindow);
61 #endif /* __LQR_READER_WINDOW_PRIV_H__ */