0

tabs -> spaces and removed windows newline

This commit is contained in:
Aaron Griffith
2012-07-03 21:07:40 -04:00
parent 2b421d6d25
commit 3286b9c576

View File

@@ -23,7 +23,6 @@
*/
#include "overviewer.h"
#include <stdio.h>
typedef struct {
PyObject_HEAD
@@ -504,7 +503,7 @@ resize_half(PyObject *dest, PyObject *src) {
/* temp color variables */
unsigned int r, g, b, a;
/* size values for source and destination */
int src_width, src_height, dest_width, dest_height;
int src_width, src_height, dest_width, dest_height;
imDest = imaging_python_to_c(dest);
imSrc = imaging_python_to_c(src);
@@ -525,10 +524,10 @@ resize_half(PyObject *dest, PyObject *src) {
return NULL;
}
src_width = imSrc->xsize;
src_height = imSrc->ysize;
dest_width = imDest->xsize;
dest_height = imDest->ysize;
src_width = imSrc->xsize;
src_height = imSrc->ysize;
dest_width = imDest->xsize;
dest_height = imDest->ysize;
/* make sure destination size is 1/2 src size */
if (src_width / 2 != dest_width || src_height / 2 != dest_height) {
@@ -548,8 +547,8 @@ resize_half(PyObject *dest, PyObject *src) {
}
/* set to fully opaque if source has no alpha channel */
if(!src_has_alpha)
a = 0xFF << 2;
if(!src_has_alpha)
a = 0xFF << 2;
for (y = 0; y < dest_height; y++) {
@@ -559,51 +558,51 @@ resize_half(PyObject *dest, PyObject *src) {
for (x = 0; x < dest_width; x++) {
// read first column
r = *in_row1;
r += *in_row2;
in_row1++;
in_row2++;
g = *in_row1;
g += *in_row2;
in_row1++;
in_row2++;
b = *in_row1;
b += *in_row2;
in_row1++;
in_row2++;
// read first column
r = *in_row1;
r += *in_row2;
in_row1++;
in_row2++;
g = *in_row1;
g += *in_row2;
in_row1++;
in_row2++;
b = *in_row1;
b += *in_row2;
in_row1++;
in_row2++;
if (src_has_alpha)
{
a = *in_row1;
a += *in_row2;
in_row1++;
in_row2++;
}
{
a = *in_row1;
a += *in_row2;
in_row1++;
in_row2++;
}
// read second column
r += *in_row1;
r += *in_row2;
in_row1++;
in_row2++;
g += *in_row1;
g += *in_row2;
in_row1++;
in_row2++;
b += *in_row1;
b += *in_row2;
in_row1++;
in_row2++;
// read second column
r += *in_row1;
r += *in_row2;
in_row1++;
in_row2++;
g += *in_row1;
g += *in_row2;
in_row1++;
in_row2++;
b += *in_row1;
b += *in_row2;
in_row1++;
in_row2++;
if (src_has_alpha)
{
a += *in_row1;
a += *in_row2;
in_row1++;
in_row2++;
}
{
a += *in_row1;
a += *in_row2;
in_row1++;
in_row2++;
}
// write blended color
// write blended color
*out = (UINT8)(r >> 2);
out++;
*out = (UINT8)(g >> 2);
@@ -613,9 +612,9 @@ resize_half(PyObject *dest, PyObject *src) {
if (dest_has_alpha)
{
*out = (UINT8)(a >> 2);
out++;
}
*out = (UINT8)(a >> 2);
out++;
}
}
}