Page 1 of 1

source code for "convert.exe"

Posted: 2009-06-10T06:07:49-07:00
by Pravin
Hi,

Is source code for "convert.exe" is available? I want to use ImageMagicK from .net code (not using command line utility) covering all functionality. it will be great if I get source code of "convert.exe".

Thanks.

Re: source code for "convert.exe"

Posted: 2009-06-10T06:41:23-07:00
by magick
You can find the ImageMagick source from the web site, http://www.imagemagick.org.

Re: source code for "convert.exe"

Posted: 2009-06-13T03:53:04-07:00
by anthony
I suggest you download a subversion copy of the source, as it will contain the most up-to-date additions that developers (such as myself) are working on, and allow you to join in discussions about things.

If you are looking for how a particular operation is performed, I would start by searching for that 'option' in the file "wand/mogrify.c" which is used by both mogrify and convert.

Almost all operation calls (for example "CompositeImage()") can then be looked up in the ".h" files in the "magick" sub-directory, and the actual function in the corresponding ".c" file.

Do not bother to try and trace the exact path of "convert" itself, as you will probably get lost.


Is there something of particular interest?

Re: source code for "convert.exe"

Posted: 2016-11-19T10:09:28-07:00
by saminpa
I realize this is a very old post but it lives on Google and might help the next person who's looking for an answer.

All I wanted to do was figure out how to handle stride correctly in a bmp when given a RGB stream that wasn't working right in my code and I was looking at this massive repository wondering where to look to see what I was doing wrong... (being stupid and illogical because the source was padded with zeros at the end that made the packed RGB the size of bmp data with stride already included for some bizarre reason)

The answer in three steps if you have visual studio (or can download the community edition for free, I think)

1. Get the source (I found ImageMagick-7.0.3-7)
2. Load and run the project ImageMagick-7.0.3-7\VisualMagick\configure\configure.sln. This will build/setup the actual VS solution according to your specifications, VisualDynamicMT.sln according to my default selections (I did specifically set the checkbox for legacy components since I believe convert has been superseded)
3. Select UTIL_magick as the default (executable) project with "-depth 8 -size 3422x2636 C:\Temp\in.rgb C:\Temp\out.bmp" without the quotes in project configuration settings/debugging/command arguments and step through the code in the debugger

The code matches your arguments to a pattern and will use the file extensions to figure out what you want to do.

Of course Step 0 is to read some of the documentation but you don't need a whole lot of information to get started. Hth.

Re: source code for "convert.exe"

Posted: 2016-11-19T14:48:52-07:00
by snibgo
Code that is specific to reading or writing a format will be found in the "coders" directory, eg "coders/bmp.c".