Page 1 of 1

Need help to make my program smaller

Posted: 2009-06-14T10:03:23-07:00
by gnaiqiz
Hi,

I wanted to use the Image and blob class in Magick++ for resizing and converting of PNG files to JPEG. These are the only functions i needed. I am doing so as i wanted the program to be small. I do not need the other functions. Right now, the dlls required are 2MB. I suppose there are a lot of unused functions being stored in the dll too.

I have tried removing the unneeded classes from MagickCore but doing so seems very complicated as there are alot of dependancies.

I also tried to use static libraries, hoping that it will extract only the required functions and build it into the executable, but i have not been successful so far.

Any comments on how i should go about doing it? I have been researching on it for 1 weeks already. Hope some one can enlighten me. Thanks

Regards
gnaiqiz

Re: Need help to make my program smaller

Posted: 2009-06-14T12:54:42-07:00
by magick
The only method for reducing the MagickCore API overhead is exactly what you are doing. You need to remove whatever modules you do not need and hand edit the build files. As you have seen there are many dependencies. In the magick folder you can probably remove the image processing modules such as enhance.c, fx.c, resize.c, etc. You can leave the X11 modules (animate, import, xwindow, widget, etc) since they are not compiled unless X11 is defined. You can move almost all the coders, except the ones you need and xc.c and pattern.c. You won't need the utilities or the Wand API at all.

Re: Need help to make my program smaller

Posted: 2009-06-16T08:08:41-07:00
by gnaiqiz
Hi,

thanks alot for your advice, i manage to make the dll even smaller.thasnk!

Regards
gnaiqiz