Page 1 of 1

automatic image editing

Posted: Sat Oct 06, 2012 2:20 pm
by Raseri
Hello!
I honestly tried to find the relevant information on the forum, but I do not know much English.
Please help me.

Write code to Lua, which does the following:
1) assigns the "self.Image" image Example.bmp, which lies in Gamedirectory / Sprites
2) assigns the "self.Pixel" color code from the image point coordinates (5,2)
3) assigns the "self.Pixel" a different color code and use it to change the image accordingly
4) saves the modified picture in Gamedirectory / Sprites

I want to write a program that will save me from having to draw such boring things as concrete and steel inserts (I'm an artist and I draw bunkers for Cortex Command).
I know a little lua and I know how to create an array of flowers concrete and steel (color code), and how to randomly choose the values to paint such places.
I'm going to use Love as the basis for this program.

I not recommend any pointless programming lessons, because I really do not know much English.
If you write the code that I asked for, then you will do me a lot and the best service in my position.
If I can help you in return, draw something, I'll do it.

Send me a private message or write directly to the subject.

If the text looks disgusting - all claims to google translate ^^
xq7yx.jpg
xq7yx.jpg (10.68 KiB) Viewed 222 times

Re: automatic image editing

Posted: Sat Oct 06, 2012 4:50 pm
by Roland_Yonaba
Some pointers.
Some side notes, though. You won't be able to save data in same directory where you loaded the bitmap image.
Love.filesystem won't allow that. You can use the save directory instead, setting the app's identity inside conf.lua or using love.filesystem.setIdentity() as well.

Hope this helps.

And by the way, welcome around.
(Pardon my pedancy, but) where're you from ?