This video is available to students only

Buying An Image -- Reading Pixels

The rest of the script can be found in `scripts/buy-pixels-001-read.js` below

We want to see way more pixels on our page. There's no way anyone wants to sit and buy each individual pixel. Instead, what we're going to do is write a script, that will take an image and a location as input, and then submit the necessary transactions to geth to color those pixels.

Before we can do that, though, we need to write a script that will read an image. We're going to use the get-pixels library to read images.

First, let's create a scripts folder to save this utility script.

The rest of the script can be found in scripts/buy-pixels-001-read.js below

 

This page is a preview of Million Ether Homepage

Start a new discussion. All notification go to the author.