1

I am developing an application that generates images from certain input data through the command "iup.image" and "iup.SaveImage". Now, I need to read this image file again and retrieve the pixels.

I found the command "iup.LoadImage" but I could not find a way to proceed. Can someone help me? I am using LUA language by ZeroBrane Studio.

1 Answers1

4

The pixels of an IUP image can be accessed through the WID attribute in C. IUP images are designed to be simple resources used in buttons, labels and other interface elements.

If you want to manipulate pixels in Lua you should use IM directly. You are already using IM underneath when you call iup.SaveImage and iup.LoadImage.

Antonio Scuri
  • 1,046
  • 6
  • 10
  • Thanks for answer, after research about this "IM" library I found one method for to resolve my problem. local image = im.FileImageLoad("teste.png"); //directory print(image[0][0][0]); // [channe][row][column] Where print() function write in window the respective values of the pixels in positions described – Amauri Júnior Aug 21 '17 at 12:31