3
Copyright (C) 2000 Martin Vogt
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU Library General Public License as published by
7
the Free Software Foundation.
9
For more information look at the file COPYRIGHT in this package
14
#include "ditherRGB_flipped.h"
18
DitherRGB_flipped::DitherRGB_flipped() {
23
DitherRGB_flipped::~DitherRGB_flipped() {
24
if (flipSpace != NULL) {
32
void DitherRGB_flipped::flipRGBImage(unsigned char* dest,unsigned char* src,
33
int depth,int width,int height,int ) {
50
cout << "unknown byteDepth:"<<depth
51
<< " in DitherRGB_flipped::flipRGBImage"<<endl;
56
int spaceNeeded=width*height*byteDepth;
58
if (spaceNeeded > flipSize) {
59
if (flipSpace != NULL) {
62
cout << "flipSpace:"<<spaceNeeded<<endl;
63
flipSpace=new unsigned char[spaceNeeded+64];
68
int lineSize=width*byteDepth;
69
unsigned char* end=dest+lineSize*(height-1);
71
for (i=0;i<height;i++) {
72
memcpy(end,src,lineSize);