Imagedata row order

J. Landman Gay jacque at hyperactivesw.com
Fri Jul 21 17:41:50 EDT 2006


Mark Schonewille wrote:
> Hi Jacque,
> 
> Probably, the nice column is junk as well. Make sure that the image has 
> the correct size to make your pattern fit. If you repeat a pattern of 
> 8x8 pixels 4 times, your image must be either 8x32 or 32x8 pixels large. 
> If you repeat the pattern 16 times without any returns in the string, it 
> should fit the 32x32 px image. How are you creating the image data?

I'm reading a field and translating characters I find in it into pixel 
colors. I've fixed the problem by making sure I have enough characters 
in each line of the field to completely fill each row of the image. It 
seems to work now.

The puzzling part was that when I had 8 lines that were only 8 
characters long each, and I applied 4 repetitions, the imageData was set 
as a column on the left side of the image, 8 wide and 32 high, with the 
remainder of the image empty. I thought imageData was applied in rows 
from left to right. I expected to see junk at the top, not a column at 
the side. I was wondering what made it wrap. There are no returns in my 
imageData.

A side effect of this experiment was that after a couple of tries, Rev 
crashes. So maybe I'm not seeing something that is really supposed to 
happen. ;)

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list