Scaling up an image
- by codefail
How do I fulfill the condition "returns the entire scaled up image"
If I am coding this correctly, scaleColor handles individual colors, getRed handles the red, etc. I am multiplying this by the input, numTimes, which will create a new image that is scaled up it.
This scaled up (increase size) is to be returned.
This is what I have.
Image Image::scaleUp(int numTimes) const
{
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
pixelData[x][y].scaleColor(pixelData[x][y].scaleRed(pixelData[x][y].getRed()*numTimes));
pixelData[x][y].scaleColor(pixelData[x][y].scaleGreen(pixelData[x][y].getGreen()*numTimes));
pixelData[x][y].scaleColor(pixelData[x][y].scaleBlue(pixelData[x][y].getBlue()*numTimes));
}
}
//return Image();
}