Opened 14 years ago

Closed 14 years ago

#2188 closed defect (fixed)

read pixel pushes an int to stack

Reported by: tonyforster Owned by: walter
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Turtleart Version: Unspecified
Severity: Unspecified Keywords: dextrose
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

read pixel rounds colour values to an int, thats 0,0,0 to 1,1,1 or a colour space of only 8 colours.

Colour values are complements of what I would expect, ie 101 for green where i would expect 010, black 111 rather than 000

I dont understand turtle sees, print turtle sees always gives me 0

Attachments (6)

Screenshot of "Turtle Blocks Activity".png (80.5 KB) - added by tonyforster 14 years ago.
Turtle Blocks Activity color2 (1.8 KB) - added by tonyforster 14 years ago.
turtle-sees-test.ta (2.4 KB) - added by walter 14 years ago.
ta project for testing Turtle Sees block
test of turtle sees.png (141.9 KB) - added by walter 14 years ago.
output of test on XO 1 running 353py, TA v95 (prerelease)
test of read pixel.png (109.0 KB) - added by walter 14 years ago.
output of read pixel test
Screenshot of "shadeandcolor.ta" (198.3 KB) - added by tonyforster 14 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 14 years ago by walter

Hmm. Not at all the expected behavior.

You are running on an XO 1 or XO 1.5?

I've tested extensively on XO 1 (362py) and it all works as expected. (Also in sugar-jhbuild.)

I'll come up with a test .ta file so we can have a common ground for debugging.

comment:2 Changed 14 years ago by tonyforster

running on xo1, os373pyg, ta94

comment:3 Changed 14 years ago by tonyforster

  • Keywords dextrose added

Changed 14 years ago by tonyforster

comment:4 Changed 14 years ago by tonyforster

more on print turtle sees
its not always 0, i just chanced a few 0's

set color turtle sees

red 0 30
orange 10 70
yellow 20 70
green 30 0
bu/gn 40 0
lt blu 50 0
mid blu60 0
dk blu 70 0
blu/vio80 30
vio 90 30

Changed 14 years ago by tonyforster

Changed 14 years ago by walter

ta project for testing Turtle Sees block

Changed 14 years ago by walter

output of test on XO 1 running 353py, TA v95 (prerelease)

comment:5 Changed 14 years ago by walter

Bill,

Attached is a .ta file I used to test the Turtle Sees block as well as the output image from the test. My results are quite different from yours.

Please try using http://wiki.sugarlabs.org/images/3/37/TurtleArt-95.xo for your test.

thanks.

Changed 14 years ago by walter

output of read pixel test

comment:6 Changed 14 years ago by walter

Also attached is the output of the read pixel test.

Note that since the color values in the palette are 8,8,8 bit rgb and the XO is 5,6,5, we'll not necessarily ever get an exact match. Currently I shift the red and blue values by 3 and the green values by 2. Perhaps I should change the palette to use the 5, 6, 5 colors so that we get an exact match (but this is only going to work for gray == 100 and shade == 5.

comment:7 Changed 14 years ago by tonyforster

V95 fixes it
Should let Bernie know V93 is in the pyg release candidate

Changed 14 years ago by tonyforster

comment:8 Changed 14 years ago by tonyforster

color != turtle sees
the error is quite big for shade !=50
havent tried gray
image attached

comment:9 Changed 14 years ago by tonyforster

uploaded screenshot has the png in filename mangled, logged as http://bugs.sugarlabs.org/ticket/1638#comment:3

comment:10 Changed 14 years ago by walter

I suppose that if shade or gray are not at 50, 100 respectfully, I could try to do a conversion before trying to map to the palette. (Originally I was going to ignore these cases as being inherently too noisy, but I'll test it.)

comment:11 Changed 14 years ago by walter

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.