mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 18:06:18 +03:00
Merge pull request #4619 from radarhere/unused
This commit is contained in:
commit
9f4c5810ec
|
@ -19,10 +19,10 @@
|
||||||
|
|
||||||
#include "Imaging.h"
|
#include "Imaging.h"
|
||||||
|
|
||||||
#define CHOP(operation, mode)\
|
#define CHOP(operation)\
|
||||||
int x, y;\
|
int x, y;\
|
||||||
Imaging imOut;\
|
Imaging imOut;\
|
||||||
imOut = create(imIn1, imIn2, mode);\
|
imOut = create(imIn1, imIn2, NULL);\
|
||||||
if (!imOut) {\
|
if (!imOut) {\
|
||||||
return NULL;\
|
return NULL;\
|
||||||
}\
|
}\
|
||||||
|
@ -83,43 +83,43 @@ create(Imaging im1, Imaging im2, char* mode)
|
||||||
Imaging
|
Imaging
|
||||||
ImagingChopLighter(Imaging imIn1, Imaging imIn2)
|
ImagingChopLighter(Imaging imIn1, Imaging imIn2)
|
||||||
{
|
{
|
||||||
CHOP((in1[x] > in2[x]) ? in1[x] : in2[x], NULL);
|
CHOP((in1[x] > in2[x]) ? in1[x] : in2[x]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Imaging
|
Imaging
|
||||||
ImagingChopDarker(Imaging imIn1, Imaging imIn2)
|
ImagingChopDarker(Imaging imIn1, Imaging imIn2)
|
||||||
{
|
{
|
||||||
CHOP((in1[x] < in2[x]) ? in1[x] : in2[x], NULL);
|
CHOP((in1[x] < in2[x]) ? in1[x] : in2[x]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Imaging
|
Imaging
|
||||||
ImagingChopDifference(Imaging imIn1, Imaging imIn2)
|
ImagingChopDifference(Imaging imIn1, Imaging imIn2)
|
||||||
{
|
{
|
||||||
CHOP(abs((int) in1[x] - (int) in2[x]), NULL);
|
CHOP(abs((int) in1[x] - (int) in2[x]));
|
||||||
}
|
}
|
||||||
|
|
||||||
Imaging
|
Imaging
|
||||||
ImagingChopMultiply(Imaging imIn1, Imaging imIn2)
|
ImagingChopMultiply(Imaging imIn1, Imaging imIn2)
|
||||||
{
|
{
|
||||||
CHOP((int) in1[x] * (int) in2[x] / 255, NULL);
|
CHOP((int) in1[x] * (int) in2[x] / 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
Imaging
|
Imaging
|
||||||
ImagingChopScreen(Imaging imIn1, Imaging imIn2)
|
ImagingChopScreen(Imaging imIn1, Imaging imIn2)
|
||||||
{
|
{
|
||||||
CHOP(255 - ((int) (255 - in1[x]) * (int) (255 - in2[x])) / 255, NULL);
|
CHOP(255 - ((int) (255 - in1[x]) * (int) (255 - in2[x])) / 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
Imaging
|
Imaging
|
||||||
ImagingChopAdd(Imaging imIn1, Imaging imIn2, float scale, int offset)
|
ImagingChopAdd(Imaging imIn1, Imaging imIn2, float scale, int offset)
|
||||||
{
|
{
|
||||||
CHOP(((int) in1[x] + (int) in2[x]) / scale + offset, NULL);
|
CHOP(((int) in1[x] + (int) in2[x]) / scale + offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
Imaging
|
Imaging
|
||||||
ImagingChopSubtract(Imaging imIn1, Imaging imIn2, float scale, int offset)
|
ImagingChopSubtract(Imaging imIn1, Imaging imIn2, float scale, int offset)
|
||||||
{
|
{
|
||||||
CHOP(((int) in1[x] - (int) in2[x]) / scale + offset, NULL);
|
CHOP(((int) in1[x] - (int) in2[x]) / scale + offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
Imaging
|
Imaging
|
||||||
|
|
Loading…
Reference in New Issue
Block a user