mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Compilation fixes for imageops on linux
This commit is contained in:
parent
cc42267ba8
commit
090a8f8605
@ -5,8 +5,8 @@
|
|||||||
* Distributed under terms of the GPL3 license.
|
* Distributed under terms of the GPL3 license.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdexcept>
|
|
||||||
#include "imageops.h"
|
#include "imageops.h"
|
||||||
|
#include <stdexcept>
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QImage>
|
|
||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
|
#include <QImage>
|
||||||
|
|
||||||
QImage remove_borders(const QImage &image, double fuzz);
|
QImage remove_borders(const QImage &image, double fuzz);
|
||||||
QImage grayscale(const QImage &image);
|
QImage grayscale(const QImage &image);
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
%Import QtGui/QtGuimod.sip
|
%Import QtGui/QtGuimod.sip
|
||||||
%ModuleCode
|
%ModuleCode
|
||||||
#include <imageops.h>
|
#include <imageops.h>
|
||||||
|
#include <stdexcept>
|
||||||
#define IMAGEOPS_PREFIX \
|
#define IMAGEOPS_PREFIX \
|
||||||
if (a0->isNull()) { PyErr_SetString(PyExc_ValueError, "Cannot operate on null QImage"); return NULL; } \
|
if (a0->isNull()) { PyErr_SetString(PyExc_ValueError, "Cannot operate on null QImage"); return NULL; } \
|
||||||
try {
|
try {
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
* Distributed under terms of the GPL3 license.
|
* Distributed under terms of the GPL3 license.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <algorithm>
|
#include "imageops.h"
|
||||||
|
#include <stdexcept>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include "imageops.h"
|
|
||||||
|
|
||||||
// Increasing this number improves quality but also increases running time and memory consumption
|
// Increasing this number improves quality but also increases running time and memory consumption
|
||||||
static const size_t MAX_LEAVES = 2000;
|
static const size_t MAX_LEAVES = 2000;
|
||||||
@ -31,6 +31,9 @@ static inline double log2(double x) { return log(x) / log((double)2) ; }
|
|||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#ifndef UINT64_MAX
|
||||||
|
#define UINT64_MAX 18446744073709551615ULL
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#define MAX_DEPTH 8
|
#define MAX_DEPTH 8
|
||||||
#define MAX_COLORS 256
|
#define MAX_COLORS 256
|
||||||
|
Loading…
x
Reference in New Issue
Block a user