How is this ‘codeaimage’?

    local function s(data)
        local img = {}
        for x = 1, horiAmount do
            img[x] = {}
            for y = 1, vertAmount do
                local w, h = math.floor(data.width/horiAmount), math.floor(data.height/vertAmount)
                img[x][y] = data:copy((x-1)*w, (y-1)*h, w, h)
            end
        end
        Server.UI.List["image." .. name] = img
        print("Server > Object '" .. name .. "' found!")
        Server.MessToClient("ui", "img", name, data)
    end

Example Image: i.imgur.com/vaB06KX.png (attached, too)

My logic is the following:

- Create a table ‘img’
- Store inside the table ‘img’ table to hold values for ‘x’
- Store there copied parts of the image.
I expect: ‘img’ has all the images stored.

What I don’t get:

‘img’ is used to be return as ‘codeaimage’, and not as ‘table’

@TokOut Are you trying to copy each of those 12 images from the single image and put them in a table as 12 seperate images.

Yes, @dave1707, that’s my logic.

Oh excuse me, I am wrong. Please close this and do not respond.

**The Problem was: ** The y is the topmost pixel of the image, not the bottommost