On Mar 8, 2007, at 8:23 AM, [EMAIL PROTECTED] wrote: > Meanwhile, if you're really stuck for a quick grayscale conversion on > Linux, you might consider operating on files with the shell class. > I'm > pretty sure there are some simple image-manipulation command-line > tools > that are fairly standard on Linux.
I was just about to suggest that you use the shell and the ImageMagick suite. ImageMagick is installed on every Linux distro that we have in house (and we currently test 43 different versions). There's a commandline tool provided in the suite called "convert" that can convert to and from all sorts of image types (or mogrify if you just want to overwrite the original image file). To convert ANY to grayscale, it's simply: Dim shConvert As New Shell shConvert.Execute "convert " + theGraphicsFile + " -type Grayscale " + theNewFile Of course, this implies that you are saving the image to disk before converting it and the reloading it after the convert completes, but those are pretty quick operations compared to the problem you've mentioned. In a quick test here, calling the above on a 1680x1050 32bit GIF image, converting it to Grayscale took 134 ticks of the RB clock. As an added feature, convert will also allow you to scale, resize, crop, rotate, shear, and MANY other things. Finally, Christian's MBS tools offers a pretty robust set of ImageMagick tools that may allow you to perform the operations on images in memory. Christian? HTH, Tim -- Tim Jones [EMAIL PROTECTED] _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
