Hi all,

I've been playing with bytemaps (see the latest LuaMetaFun manual) and I have come across a problem when I create more than 15 bytemaps. This came about as part of a bigger project where I create a large bytemap and then make smaller bytemaps with the data from the large bytemap. I've made a MWE below

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \startMPpage
i := 1;
for x = 1 upto 5:
 for y := 1 upto 5:
    newbytemap i of (250,250,3);
    setbytemap i to (floor(uniformdeviate(255) + 1),floor(uniformdeviate(255) + 1),floor(uniformdeviate(255) + 1));
    fill
        unitsquare xyscaled (250,250) shifted ((x) * 255, (y) *255)
        withbytemap i;
    i := i + 1;
    endfor;
endfor;
\stopMPpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

The MWE above is for a 5 X 5 grid of randomly generated colours and you can see that the last 10m squares are black. Changing x or y to 3 will give 15 coloured squares, but  a 4 X 4 grid and above gives black squares above 15 coloured squares. I can't see anything wrong with the code so I'm wondering if it is a bug. Any advice would be gratefully received. I'm running the latest update on a mac mini M1.
Thanks
Best Wishes
Keith
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to