Jump to content
  • Advertisement
Sign in to follow this  

FreeImage doesn't save to any path

This topic is 3606 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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!