If I have a structure defined like:
struct image{
unsigned int width, height;
unsigned char *data;
};
And 2 variables of this type:
struct image image1;
struct image image2;
I want to transfer the data from image1 to the data of image2(presuming image1 has some data written, and image2 has data allocated with malloc or calloc). How can it be done? Thanks a lot.