Hi
I am quite a noob in using imagemagick. I made a software program with microsoft visual c++ and I use the command line within this program to resize a picture. If I debug it, it works fine, but if I compile the program and run the executable I get an error message saying:
return: 4, convert
and then the command wich I am using to resize the picture (which works fine if I enter it in a dos command box and also works fine if I use the microsoft visual c++ debugger)
I am using
Version: ImageMagick 6.5.6-10 2009-10-08 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
can somebody please tell me what I am doing wrong? Or where to find information on this topic?
thanks, Anjo
erro message 4 using convert
Re: erro message 4 using convert
nowbody?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: erro message 4 using convert
best I can suggest as a non-windows user is to add the full path to your convert or other IM commands in your code
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: erro message 4 using convert
Perhaps post the part of your code that actually calls imagemagick command?
Without more information it is impossible to help!
Without more information it is impossible to help!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: erro message 4 using convert
the code is the following:
so the full name is already incorporated in the code
thanks, Anjo
Code: Select all
if (width>heigth)
{ sprintf (command, "convert d:\\website\\toevoegen\\%s -resize 120 d:\\website\\toevoegen\\%s", filename, filenamesmall);
systemcommand (command);
}
else
{ sprintf (command, "convert d:\\website\\toevoegen\\%s -resize x120 d:\\website\\toevoegen\\%s", filename, filenamesmall);
systemcommand (command);
}
thanks, Anjo
Re: erro message 4 using convert
addition: I mean the full path to the files, not to the convert command. Sorry, reply was too quick.
I will try that suggestion
thanks, Anjo
I will try that suggestion
thanks, Anjo
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: erro message 4 using convert
As a debug, output the actual command being executed somewhere and check it is what you expect!
Also you make like to add escaped quotes around the file arguments to the convert command, just in case the filename has spaces in them!
Eg "convert \"d:\\path\\to\\dir\\%s\" ...."
Also you make like to add escaped quotes around the file arguments to the convert command, just in case the filename has spaces in them!
Eg "convert \"d:\\path\\to\\dir\\%s\" ...."
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/