im creating a small program to scan the contents of a dir and resize all images in there to a specified width/height. anyway the problem is i cant change the width / height properties of the image.
i am using the gdi+ Image* image = new Image(wFile); to open my image, then i am getting its width and height
UINT imageHeight = image->GetHeight();
UINT imageWidth = image->GetWidth();
then i go on to get the jpeg encoder and save the image, which makes a exact copy of the image i have opened.
image->Save(oFile, &encoderClsid, &encoderParameters);
i have searched everywhere in the msdn on a way to change the width and height properties of Image, but there doesnt seem to be a method to support that.
So to finally ask my question, is there a way to change the width and height properties of the image class or is there another class that will take have a method to manipulate an image object?
thanks for your help.
Welcome to the forums!
Down the bottom of the documentation for Image::GetHeight(), there is a couple of links under the "See also" section. Have a look and see how far you get. If you need further help, please post back.
If you need small images, you can also have a look at Image::GetThumbnailImage().
hey thanks for the welcome and quick reply.
I have been searching through the msdn for over a week now, its probably my bad searching methods but i've yet to find anything useful in saving a image with different width and height properties.
What i have come up with is passing the image class to the graphics class, and then changing the width and height in the graphics class, and then passing it to the bitmap class to save the new width and height.
i dont know if this is a stupid thing to do or not, but in theory this should work. Please teach me a better way if there is one. I love software development and am willing to learn anything.
Thanks again :)