I've been using IrfanView for years but up until now I had never played with the command line options. Now I wish I'd sussed this earlier. You can do loads things with these options (see the IrfanView Help file) including 'Color Reduction', 'Grayscale', 'Crop', 'Resize', 'Rotate', 'Sharpen' and 'Contrast'. But what's really cool about it is you can do all this via the clipboard so by using the clipboard functions of QBitmapEx in RapidQ2.inc you can pass bitmaps to it for manipulation and then retrieve the result from the clipboard. By adding the '/killmesoftly' command option you never see IrfanView's GUI so it behaves pretty much like a DLL. Not all the parameters are available from the command line, e.g the interpolation methods for resizing and dithering for color reduction but you can easily adjust these by writing to its '.INI' file. I've uploaded a small demo of some things I think might be of interest. Paul IrfanView can be obtained free from:- http://www.irfanview.com/ |