My code is not working

I am working on ArcadeS! V2, and this code is not working as expected.

Details

ArcadeS! V2 script pic (2)


ArcadeS! V2 script pic (6)

The 'image from grid [grid]' takes a grid/table/list of colours and converts it to an image without manually setting the width and height. It isn't working. I need help.

What does it do instead of working correctly?

I notice that your RGB ALL seems to use 1 as the alpha value rather than 255. Is your image invisible?

A few things that come to mind

I'm assuming each grid value contains a list of 4 values

Your width of grid is a bit too complex. A grid has a fixed width for all rows so you just need to find the length of the 1st item of the grid

To make a new costume - the pixel list should be in a format like this
145 23 68 1
128 64 32 255
....
i.e a list of 4 values for each pixel
The length will be be height of grid * width of grid

So instead of flattening the grid - reshape it - stick height*width as 2nd parameter, 4 as third (1st is the grid)

I don't think you'll need anything inside your mapping (but maybe a list() - I've not tried coding this)

It seems that the color picker reports 1 for the alpha.

untitled script pic - 2024-09-28T213230.998

untitled script pic - 2024-09-28T213107.995

Thanks! It works!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.