HP Prime - GETPIX_P Return? - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: HP Prime - GETPIX_P Return? (/thread-256853.html) |
HP Prime - GETPIX_P Return? - Thomas Chrapkiewicz - 11-24-2013 Any experience with the data returned from the GETPIX_P(x,y,)function? When I execute:
PIXON_P(160,120,#0000FF); prints 248 - that is the return value always seems 'off' by about 7 (3 bits low?). Is there a datatype/bitwidth conversion I am missing? Thanks,
TomC
Re: HP Prime - GETPIX_P Return? - Patrice - 11-24-2013 The color coding is the one of html.
EXPORT SHOW_CLR() Re: HP Prime - GETPIX_P Return? - Thomas Chrapkiewicz - 11-24-2013 Thank you Patrice! Very nice code!
TomC
Re: HP Prime - GETPIX_P Return? - Thomas Chrapkiewicz - 11-24-2013 Along these lines, what I'm after, is to read a pixel, and return the amount of R, G and B in that pixel. It seems I need to read the pixel, mask the appropriate bits and then ignore the lower three bits. Has anyone developed code for this? thanks,
TomC
Re: HP Prime - GETPIX_P Return? - Damien - 11-24-2013 This thread, on omnimaga forum, may interest you: Regards
Damien. Edited: 24 Nov 2013, 6:22 p.m.
Re: HP Prime - GETPIX_P Return? - cyrille de Brébisson - 11-25-2013 Hello,
internally, colors are codded in 16 bits using ARGB 1555 format.
you should get what you want.
Re: HP Prime - GETPIX_P Return? - Thomas Chrapkiewicz - 11-25-2013 Cyrille: Thank you! That explains it - I wasn't certain what that leading most significant bit was! Regards,
TomC
Re: HP Prime - GETPIX_P Return? - Thomas Chrapkiewicz - 11-25-2013 Damien: Thanks!
TomC
|