• Advertisement
Sign in to follow this  

FreeImage doesn't save to any path

This topic is 3386 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, I have some code which works fine, except I can't find any way to make it save images to a specified path using FreeImage_Save(), it only works with just the file name, which causes it to end up in the application's start-up directory. Preferably I'd like it to end up in a sub-directory of the application dir such as "cache\file.jpg", or any global dir. But it just gives me an error if I use anything other than "file.jpg". FreeImage_Load() have no problems like this, it swallows any valid path. Any ideas?
void writeImage(char *name, TextureImage &T, FREE_IMAGE_FORMAT f) {
	if(!FreeImage_Save(f, T.image, name, 0)) {
		cout << "Error: FreeImage_Save:" << name << endl;
	}
}

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement