/usr/include/lqr-1/lqr/lqr_base.h is in liblqr-1-0-dev 0.4.2-2.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | /* LiquidRescaling Library
* Copyright (C) 2007-2009 Carlo Baldassi (the "Author") <carlobaldassi@gmail.com>.
* All Rights Reserved.
*
* This library implements the algorithm described in the paper
* "Seam Carving for Content-Aware Image Resizing"
* by Shai Avidan and Ariel Shamir
* which can be found at http://www.faculty.idc.ac.il/arik/imret.pdf
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; version 3 dated June, 2007.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>
*/
#ifndef __LQR_BASE_H__
#define __LQR_BASE_H__
#define LQR_MAX_NAME_LENGTH (1024)
#if defined(G_OS_WIN32) && ! defined(LQR_DISABLE_DECLSPEC)
# ifdef LQR_EXPORTS
# define LQR_PUBLIC __declspec(dllexport)
# else
# define LQR_PUBLIC __declspec(dllimport)
# endif /* LQR_EXPORTS */
#elif defined(__GNUC__) && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
# ifndef GCC_HASCLASSVISIBILITY
# define GCC_HASCLASSVISIBILITY
# endif /* !GCC_HASCLASSVISIBILITY */
# ifdef GCC_HASCLASSVISIBILITY
# define LQR_PUBLIC __attribute__((visibility("default")))
# else
# define LQR_PUBLIC
# endif /* GCC_HASCLASSVISIBILITY */
#else
# define LQR_PUBLIC
#endif /* G_OS_WIN32 */
#if 0
#define __LQR_DEBUG__
#endif
#if 0
#define __LQR_VERBOSE__
#endif
/**** RETURN VALUES (signals) ****/
enum _LqrRetVal {
LQR_ERROR, /* generic error */
LQR_OK, /* ok */
LQR_NOMEM, /* not enough memory */
LQR_USRCANCEL /* action cancelled by user */
};
typedef enum _LqrRetVal LqrRetVal;
#define LQR_TRY_N_N(assign) if ((assign) == NULL) { return NULL; }
/*
#define LQR_TRY_F_N(assign) if ((assign) == FALSE) { return NULL; }
#define LQR_TRY_N_F(assign) if ((assign) == NULL) { return FALSE; }
#define LQR_TRY_F_F(assign) if ((assign) == FALSE) { return FALSE; }
*/
/* generic signal processing macros */
#define LQR_CATCH(expr) G_STMT_START { \
LqrRetVal ret_val; \
if ((ret_val = (expr)) != LQR_OK) \
{ \
return ret_val; \
} \
} G_STMT_END
/* convert a NULL assignment to an error signal */
#define LQR_CATCH_MEM(expr) G_STMT_START { \
if ((expr) == NULL) \
{ \
return LQR_NOMEM; \
} \
} G_STMT_END
/* convert a boolean value to an error signal */
#define LQR_CATCH_F(expr) G_STMT_START { \
if ((expr) == FALSE) \
{ \
return LQR_ERROR; \
} \
} G_STMT_END
/* legacy */
#ifndef LQR_DISABLE_LEGACY_MACROS
# define CATCH(expr) LQR_CATCH(expr)
# define CATCH_MEM(expr) LQR_CATCH_MEM(expr)
# define CATCH_F(expr) LQR_CATCH_F(expr)
# define TRY_N_N(expr) LQR_TRY_N_N(expr)
#endif /* LQR_DISABLE_LEGACY_MACROS */
/**** IMAGE DEPTH ****/
enum _LqrColDepth {
LQR_COLDEPTH_8I,
LQR_COLDEPTH_16I,
LQR_COLDEPTH_32F,
LQR_COLDEPTH_64F
};
typedef enum _LqrColDepth LqrColDepth;
/**** IMAGE BASE TYPES ****/
typedef guchar lqr_t_8i;
typedef guint16 lqr_t_16i;
typedef gfloat lqr_t_32f;
typedef gdouble lqr_t_64f;
/**** RESIZE ORDER ****/
enum _LqrResizeOrder {
LQR_RES_ORDER_HOR,
LQR_RES_ORDER_VERT
};
typedef enum _LqrResizeOrder LqrResizeOrder;
/**** IMAGE TYPE ****/
enum _LqrImageType {
LQR_RGB_IMAGE,
LQR_RGBA_IMAGE,
LQR_GREY_IMAGE,
LQR_GREYA_IMAGE,
LQR_CMY_IMAGE,
LQR_CMYK_IMAGE,
LQR_CMYKA_IMAGE,
LQR_CUSTOM_IMAGE
};
typedef enum _LqrImageType LqrImageType;
/**** CLASSES DECLARATIONS ****/
struct _LqrCarver;
typedef struct _LqrCarver LqrCarver;
#endif /* __LQR_BASE_H__ */
|