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
automatic image editing
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: automatic image editing
Some pointers.
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 ?
- Create a new ImageData with love.image.newImageData from the image file.
- Use ImageData:setPixel to change the desired pixel color.
- Use ImageData:encode to export the modified ImageData.
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 ?
Who is online
Users browsing this forum: Bing [Bot] and 5 guests