This array, I want to know everything about it.
As I understand this is a 2D array that returns a buffer, this array has an image header where you can send an image buffer to it.
It also has it’s numpy like side from what I have read, so it can pass it’s image buffer to numpy and convert image to numpy like array and then pass to another numpy array that you can modify inside of it, like change data.
On any of the points I made 1,2,3,4 please enumerate if I’m wrong on any of them.
1 Returns an image buffer
2 Accepts an image buffer.
3 converts data inside of it from image buffer to numpy like format.
4 because of point number 3 it can pass data to other arrays acting as interemdiary array for images ?
If I’m wrong on any of these points please say so.
I’m asking because I want to use it to channel data in and out of bge, channel in and out texture images.
What I understand is
1 you render an image with bge.texture then it’s in the bgl buffer.
2 you load a regular image from file inside bge or blender it’s in the buffer ? as in regular image buffer ?
You take that buffer and you pass it to imagearray, bgl buffer or other image buffer ? do they all work with image to array
Image array passes easy data to chararay
Source |src = bge.texture.ImageRender(scene,Cam) Source to ImageArray imageArray = bge.texture.imageToArray(src,'RGB') Image array to chararray charArray = imageArray.to_list()
I have not seen a way to alter this array and change data inside of it, you have to pass it to another array like a chararay or a standard numpy array
Your thoughts on this array please for better understanding. This will help me and others, I have seen others wonder about this array and what it does, limited information on the web about it, it’s mentioned in Bge Game Engine manual briefly.
We can use this array to channel data from bge.texture class and maybe other things.
It would be nice to have a thread about each array here on blender artists, each with it’s own individual properties, how to change info inside of it, how to save and so on.
Please take the time to respond and state your opionion.
New Edit by me.
Mentions from other sites.
Here it mentions it extracts pixels.
https://answers.unity.com/questions/1252163/creating-a-map-with-tiles-of-different-shapes-by-r.html Method ImageToArray loads the image and copies the RGBA of every pixel in an array.
Here is a short list description from this site. Tho this is not for blender it clearly remarks pixel work.
https://www.mirametrics.com/help/mira_pro_x64_script_8/source/cimage_imagetoarray.htm The **ImageToArray** method converts the pixels of a [CImage](https://www.mirametrics.com/help/mira_pro_x64_script_8/source/cimage_class.htm) object to a 1- or 2-dimensional lua array (indexed table)
So it is a pixel extractor and a pixel convertor, it extracts pixels out of images and converts them meaning it’s an array that is between images and other arrays
This array is also used for Lab View, so it extracts pixels and passes to the labview 2d array
https://zone.ni.com/reference/en-XX/help/370281AG-01/imaqvision/imaq_imagetoarray/ Extracts (copies) the pixels from an image, or part of an image, into a LabVIEW 2D array. This array is encoded in 8 bits, 16 bits, or floating point, as determined by the type of input image.
Clearly and intermediary array to pass image pixel data or converted numpy data to other arrays that can be listed and worked with.
If any of you has additional information please post it here.