Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Not so smart pick !

From: reboler:ifrance at: 28-Dec-2002 12:28

Hi List, Trying to manipulate image, I have found this :
>> i: make image! 2x2
== make image! [2x2 #{000000000000000000000000}]
>> poke i 2 white
== make image! [2x2 #{000000FFFFFF000000000000}]
>> white
== 255.255.255
>> pick i 2
== Pick seems to be right for locating the value, but wrong when picking it. We got an extra byte. From RCUG (rebolcore-16.html#_Toc487519976), it looks like a bug to me: <<The pixel values of an image are obtained using pick and changed using poke . The value returned by pick is an RGB tuple value. The value replaced with poke also should be a tuple value. Picking specific pixels: probe pick img 1 probe pick img 1500 Poking specific pixels: poke img 1 255.255.255 probe pick img 1
Is there a way of getting rid of the extra byte?
>> pix: pick i 2 >> remove back tail pix ; not good >> pix: copy/part pix 3 ; not good
Regards Patrick Note: already sent to feedback (Feedback Id #2cs322060) _____________________________________________________________________ GRAND JEU SMS : Pour gagner un NOKIA 7650, envoyez le mot IF au 61321 (prix d'un SMS + 0.35 euro). Un SMS vous dira si vous avez gagné. Règlement :