NEED HELP with my image resizing program

I have a project in which i have to resize an image and recolor it, and i honestly have no idea on how to even start it.


/*
MCS2514Pgm3.cpp : main project file.
Author:
Completion Date:

This file should interface with the supplied windows GUI interface to allow images to be resampled to smaller sizes and be tinted.
Please read the included Project Specification for more detailed descriptions of the project.

In this assignment, we will be laying the foundation for a larger photo-mosiac project.
We will be finding the average color in a larger block of pixels (aka re-sampling).
This technique is often used to generate smaller versions of big images. (think of a thumbnail of the original image)

In this assignment we will be writing a program that can:

1.)Allow simple loading and saving of images.
2.)Break a loaded image up into blocks of a given width and height and find the average color in that block.
3.)Create a new image from the process in 2 that will consist of 1 pixel per every block analyzed in the first image.
4.)Apply a red, green, or blue tint to an image by increasing the appropriate RGB values to every pixel in the image.
5.)Invert the individual RGB color components of an image.


The functions in this file should be completed as follows:

bool loadImageFromFile(string filename)
INPUTS: a string containing a path to a file to open. This value is returned from the
user's selection in the open file dialog.
OUTPUTS: a boolean indicating whether or not the image could be opened correctly.

void saveImageToFile(string filename)
INPUTS: a string containing a path to save the current image out to.
OUTPUTS: NONE

image* displayImage()
INPUTS: NONE
OUTPUTS: This function should return a pointer to the image object that is currently being viewed on the screen.
If a user has loaded an image correctly, you should return a pointer to an image object containing the base image.
If a user has used the shrink button (aka averageRegions function) or performed any of the red/green/blue filters,
you should of course return a pointer to an image object that reflects these changes.

void averageRegions(int blockWidth, int blockHeight)
INPUTS: Integers indicating the width and height of the blocks?to be averaged
OUTPUTS: NONE
When this function is called, you should create a new image that will consist of 1 pixel for every block of size
blockWidth by blockHeight pixels in the original image, with each pixel being the average color of the pixels in that
region in the original image.
Please note that it may be easier if you split this into 2 functions and call your helper function from within this one.
The second function could then just calculate the average value of a block of pixels given to it, and return that
to the original function to be used. However, this implementation is up to you! Complete it as you see fit.

void increaseRedValues(int value)
INPUTS: An integer indicating the amount to increase the red component of each pixel.
OUTPUTS: NONE
When this function is called, you should take the current image and increase the red component of each
pixel in the image by the amount specified. Please note that an RGB value has a maximum of 255 and a minimum of 0.

void increaseGreenValues(int value)
INPUTS: An integer indicating the amount to increase the green component of each pixel.
OUTPUTS: NONE
When this function is called, you should take the current image and increase the green component of each pixel
in the image by the amount specified. Please note that an RGB value has a maximum of 255 and a minimum of 0.

void increaseBlueValues(int value)
INPUTS: An integer indicating the amount to increase the blue component of each pixel.
OUTPUTS: NONE
When this function is called, you should take the current image and increase the blue component of each pixel
in the image by the amount specified. Please note that an RGB value has a maximum of 255 and a minimum of 0.

void invertValues()
INPUTS: NONE
OUTPUTS: NONE
When this function is called you should "invert" all the individual components of each pixel in the current image.
To invert a pixel, simply set each component in the pixel to it's maximum value (255) minus it's current value.
So if the red component of a pixel to be inverted was 25, it should now be 230. Repeat this process for every
component of every pixel in the image.
*/

#include "stdafx.h" //needed for the Windows display
#include <cstdlib>
#include <string>

using namespace std;

#include "globals.h" //some global variables are included here
#include "pixel.h" //includes the pixel class for storing individual pixels
#include "image.h" //includes the image class we will be using.


//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//declare your global variables here!


//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



//load the image from a file and return the result
bool loadImageFromFile(string filename)
{
//add your code
return false;
}

//save an image to a file
void saveImageToFile(string filename)
{
// add your code
}

//return a pointer to your image object!
image* displayImage()
{
// add your code
return NULL;
}

//make a new image that is a smaller resampling of the bigger image
void averageRegions(int blockWidth, int blockHeight)
{
// add your code
}

//increase the red component of each pixel in the image
void increaseRedValues(int value)
{
// add your code
}

//increase the green component of each pixel in the image
void increaseGreenValues(int value)
{
// add your code

}

//increase the blue component of each pixel in the image
void increaseBlueValues(int value)
{
// add your code
}

//invert the color components of each pixel in the image
void invertValues()
{
// add your code

}




Thats what we have along with all the other files needed for the GUI, if anyone is willing to help, i can send everythign to you.
Topic archived. No new replies allowed.