This does not segment fault, but it is not reading the pixels of the "original" file.
Image Image::scaleUp(int numTimes) const
{
Image newImage(width*numTimes, height*numTimes);
newImage.createImage(width*numTimes, height*numTimes);
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
for(int inner_x = 0; inner_x < numTimes; inner_x++){
for (int inner_y = 0; inner_y < numTimes; inner_y++){
newImage.pixelData[x*numTimes+inner_x][y*numTimes+inner_y] = pixelData[x][y];
}
}
}
}
return newImage;
}
Solved now * (*except my image comes out in b/w)