mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix compilation with Visual Studio
This commit is contained in:
parent
404153b591
commit
59da7ed5be
@ -5,8 +5,9 @@
|
||||
* Distributed under terms of the GPL3 license.
|
||||
*/
|
||||
|
||||
#include "imageops.h"
|
||||
#include <stdexcept>
|
||||
#include "imageops.h"
|
||||
#include <QColor>
|
||||
|
||||
#define SQUARE(x) (x)*(x)
|
||||
#define MAX(x, y) ((x) > (y)) ? (x) : (y)
|
||||
|
@ -7,10 +7,10 @@
|
||||
%Import QtGui/QtGuimod.sip
|
||||
%ModuleCode
|
||||
#include <imageops.h>
|
||||
#define PREFIX \
|
||||
#define IMAGEOPS_PREFIX \
|
||||
QImage ans; \
|
||||
try {
|
||||
#define SUFFIX \
|
||||
#define IMAGEOPS_SUFFIX \
|
||||
if (PyErr_Occurred()) return NULL; \
|
||||
sipRes = new (std::nothrow) QImage(ans); \
|
||||
if (sipRes == NULL) return PyErr_NoMemory(); \
|
||||
@ -22,14 +22,14 @@
|
||||
|
||||
QImage* remove_borders(const QImage &image, double fuzz);
|
||||
%MethodCode
|
||||
PREFIX
|
||||
IMAGEOPS_PREFIX
|
||||
ans = remove_borders(*a0, a1);
|
||||
SUFFIX
|
||||
IMAGEOPS_SUFFIX
|
||||
%End
|
||||
|
||||
QImage* grayscale(const QImage &image);
|
||||
%MethodCode
|
||||
PREFIX
|
||||
IMAGEOPS_PREFIX
|
||||
ans = grayscale(*a0);
|
||||
SUFFIX
|
||||
IMAGEOPS_SUFFIX
|
||||
%End
|
||||
|
Loading…
x
Reference in New Issue
Block a user