Reputation: 824
Im using Magick++ Library with Qt
Im using the following code to read and write an image:
Image image;
image.read(qPrintable(f.absoluteFilePath()));
image.addNoise(GaussianNoise);
image.magick("png");
image.write("image_name");
Where f.absoluteFilePath is the absolute path for my image Example: /Users/user/Desktop/test/P1030673.jpg
After the completion of the code, I cannot locate the image named 'image_name'. I looked into the folder of the first image '/Users/macmini/Desktop/test/' and its not there I tried to search the image, but it seems is not in my computer.
Where do I go wrong? How can I save the image in my computer? is there any way to specify the path that I want the image to be saved?
Thank you
Upvotes: 1
Views: 1285
Reputation: 824
For everyone who might have tha same problem: Imagemagick will save the images inside the .app bundle
You will not be able to find the image files unless you specify a path inside the read() function
I noticed the following by checking the size of my .app file It was increased everytime I was trying to save images.
Upvotes: 1
Reputation: 5785
You should find the file saved in the current working directory. If you want to save it elsewhere give an absolute path.
Upvotes: 2