PDA

View Full Version : * Beta * Dynamic Drawing tool : PutPixel


clueless
02-03-2008, 09:57 PM
This is a very simple CommandLine Program i made for use in AMS that lets you put a pixel of any colour into an image. The drawing operation is very fast so this may be able to stretch to making bar graphs or simple drawing operations.Its pretty much untested at the moment. It accepts most of the major image formats but will only write to BMP.
File size 72kb :yes

Syntax

[Pic.bmp] [Output.bmp] [X] [Y] [Red 0-255] [Green 0-255]

[Pic.bmp] The image to be altered

[Output.bmp] The Output filename

[X] X position of pixel
[Y] Y position of pixel

[Red 0-255]
[Green 0-255]
[Blue 0-255]


[B]Example

File.Run("AutoPlay\\Progs\\PutPixel.exe", "c:\\APic c:\\OutPic.bmp 100 100 255 255 255,"", SW_SHOWNORMAL, true);

Would place a white pixel at position x=100,y=100 on the image and then save it with the filename OutPic.bmp.

Note: all file names have to be 'short' filenames to aviod extra spaces in the commanline which will cause errors.

You can use this in your own projects. A small note of credit would be appreciated in anything you use it for.
Have fun :D