hi everyone,
i have an image N*M dimension, but N and M not a power of 2 .How can i convert this image to dimension of power 2 .
the Image class is as follows:
1 2 3 4 5 6 7
class Image {
public:
Image(char* ps, int w, int h);
int width;
int height;
char* pixels;
};
Following the post of Zaita.. you should resize the image by ading dummy pixels so that N and M become powers of two.
eg. if n=3 and M=7 , add a dummy row and a column in the "array" , and store zero or NULL values in them so that they are included in the processing stage.