views:

89

answers:

3

For the task I'm trying to accomplish, I need to generate many images, all consisting of a black circle border on a transparent background, but each a different size (going up in size from 3x3 to, say, 20x20).

Preferably they would be GIFs or PNGs, as these support transparency.

I started building a simple C# Console project for this, but I'm wondering if there's already a tool out there that does this, so I can avoid wasting time.

A: 

I think it would be faster to just make your 18 PNGs in GIMP or some other comparable paint program.

Anthony Mills
Until you've changed the colors 10 times and realize that you could have saved time if you had just written a program to do it in the first place.
Greg
+1  A: 

Your strategy sounds good.

Simply create a Bitmap of the correct size, create a Graphics object using Graphics.FromImage().

Clear the Graphics using Color.Transparent and draw a black circle with FillCircle().

If you need antialiasing, set smoothing mode to high quality.

Coincoin
+1  A: 

Draw one 256x256 image of a circle, and scale it down with a batch tool like imagemagick, graphicsmagick, irfan-view, or some-such to all the sizes you need. Little code needed. This assumes you don't need a constantly sized width to the circle outline.

dlamblin