# I want to look into something. how do i extract a 8bit and view it

**URL:** https://discourse.processing.org/t/i-want-to-look-into-something-how-do-i-extract-a-8bit-and-view-it/10316
**Category:** Coding Questions
**Created:** [April 16, 2019, 1:00am UTC](https://discourse.processing.org/t/i-want-to-look-into-something-how-do-i-extract-a-8bit-and-view-it/10316 "2019-04-16T01:00:16Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![octaminotin](https://avatars.discourse-cdn.com/v4/letter/o/f475e1/32.png) [@octaminotin](https://discourse.processing.org/u/octaminotin)
#### Post date: [April 16, 2019, 1:00am UTC](https://discourse.processing.org/t/i-want-to-look-into-something-how-do-i-extract-a-8bit-and-view-it/10316/1 "2019-04-16T01:00:16Z")

</div>

i got this in p5.js

{dot.operator  
function setup1() {  
createCanvas(400, 500);  
b = true  
b = canvas  
function draw() {  
background(220);  
}  
{ if (image is loaded)  
b = true  
b = canvas}

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [April 16, 2019, 1:08am UTC](https://discourse.processing.org/t/i-want-to-look-into-something-how-do-i-extract-a-8bit-and-view-it/10316/2 "2019-04-16T01:08:22Z")

</div>

again, please format your code in

```auto
</> code tag

```

and make it an example we can run here in processing IDE

-B- the question is related to what? not to this code?  
much more explanation is needed.

---

<div class="post-metadata">

### Author: ![octaminotin](https://avatars.discourse-cdn.com/v4/letter/o/f475e1/32.png) [@octaminotin](https://discourse.processing.org/u/octaminotin)
#### Post date: [April 16, 2019, 1:31am UTC](https://discourse.processing.org/t/i-want-to-look-into-something-how-do-i-extract-a-8bit-and-view-it/10316/3 "2019-04-16T01:31:52Z")

</div>

o wait, it would be from the graphics, this is up for scrutiny then.

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [April 16, 2019, 1:40am UTC](https://discourse.processing.org/t/i-want-to-look-into-something-how-do-i-extract-a-8bit-and-view-it/10316/4 "2019-04-16T01:40:06Z")

</div>

as you can not post code here, possibly it is better we just work online together,  
show / link us a **running** code in  
[https://editor.p5js.org/](https://editor.p5js.org/)  
and ask your question in detail again.

---

<div class="post-metadata">

### Author: ![octaminotin](https://avatars.discourse-cdn.com/v4/letter/o/f475e1/32.png) [@octaminotin](https://discourse.processing.org/u/octaminotin)
#### Post date: [April 16, 2019, 1:40am UTC](https://discourse.processing.org/t/i-want-to-look-into-something-how-do-i-extract-a-8bit-and-view-it/10316/5 "2019-04-16T01:40:46Z")

</div>

lb t,off(b) # $t \<— Sign-extended byte  
# from memory address b+off  
# b is a base register.  
# off is 16-bit two’s complement.

i fount this for example

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [April 16, 2019, 1:53am UTC](https://discourse.processing.org/t/i-want-to-look-into-something-how-do-i-extract-a-8bit-and-view-it/10316/6 "2019-04-16T01:53:31Z")

</div>

if you want the color information from a loaded image  
on a specific pixel location  
can use the 2 ways mentioned here:  
[https://p5js.org/reference/#/p5/get](https://p5js.org/reference/#/p5/get)

---

<div class="post-metadata">

### Author: ![octaminotin](https://avatars.discourse-cdn.com/v4/letter/o/f475e1/32.png) [@octaminotin](https://discourse.processing.org/u/octaminotin)
#### Post date: [April 17, 2019, 12:33am UTC](https://discourse.processing.org/t/i-want-to-look-into-something-how-do-i-extract-a-8bit-and-view-it/10316/7 "2019-04-17T00:33:45Z")

</div>

i invented this some how.  
it changes the page let me see if i can provide the same outcome  
how would i measure it. in crosh i would think using the help functions, are there p5 notes out there.

{dot.operator  
function setup1() {

---

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [April 20, 2019, 12:32am UTC](https://discourse.processing.org/t/i-want-to-look-into-something-how-do-i-extract-a-8bit-and-view-it/10316/8 "2019-04-20T00:32:24Z")

</div>


