Skip to content

Commit

Permalink
[pictures] fix flipping horizontally/vertically and rotate by 180 swa…
Browse files Browse the repository at this point in the history
…pping the width and height
  • Loading branch information
Jonathan Marshall committed Jul 1, 2012
1 parent 3b7d4b2 commit 37fc72c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xbmc/pictures/Picture.cpp
Expand Up @@ -373,7 +373,7 @@ uint32_t *CPicture::FlipHorizontal(uint32_t *pixels, unsigned int width, unsigne
for (unsigned int x = 0; x < width / 2; ++x) for (unsigned int x = 0; x < width / 2; ++x)
std::swap(line[x], line[width - 1 - x]); std::swap(line[x], line[width - 1 - x]);
} }
return pixels; return NULL;
} }


uint32_t *CPicture::FlipVertical(uint32_t *pixels, unsigned int width, unsigned int height) uint32_t *CPicture::FlipVertical(uint32_t *pixels, unsigned int width, unsigned int height)
Expand All @@ -386,7 +386,7 @@ uint32_t *CPicture::FlipVertical(uint32_t *pixels, unsigned int width, unsigned
for (unsigned int x = 0; x < width; ++x) for (unsigned int x = 0; x < width; ++x)
std::swap(*line1++, *line2++); std::swap(*line1++, *line2++);
} }
return pixels; return NULL;
} }


uint32_t *CPicture::Rotate180CCW(uint32_t *pixels, unsigned int width, unsigned int height) uint32_t *CPicture::Rotate180CCW(uint32_t *pixels, unsigned int width, unsigned int height)
Expand All @@ -405,7 +405,7 @@ uint32_t *CPicture::Rotate180CCW(uint32_t *pixels, unsigned int width, unsigned
for (unsigned int x = 0; x < width / 2; ++x) for (unsigned int x = 0; x < width / 2; ++x)
std::swap(line[x], line[width - 1 - x]); std::swap(line[x], line[width - 1 - x]);
} }
return pixels; return NULL;
} }


uint32_t *CPicture::Rotate90CCW(uint32_t *pixels, unsigned int width, unsigned int height) uint32_t *CPicture::Rotate90CCW(uint32_t *pixels, unsigned int width, unsigned int height)
Expand Down

0 comments on commit 37fc72c

Please sign in to comment.