Extracting rgba value of each pixel of an image

In this blog post, a free online webapp is recommended to extract rgba value of image pixels, and save as a csv file.

Tool

Image Pixel Rgba

Access

https://s.wtsolutions.cn/image-pixel-rgba.html

Usage

  1. Opening the link above
  2. Drag and drop your images to the webapp
  3. Wait until a pop up showing completion
  4. Check for the exported .csv file

Advantages

  1. Free Webapp
  2. Privacy matters, the images will stay locally on your device, will not be transmitted to any server.
  3. Very simple UI, simple to use.

Convert Excel to JSON within Excel

In this blog post, a free solution for converting Excel to JSON is presented.

Excel-to-JSON add-in

Excel to JSON is a Microsoft Excel add-in which can convert Excel to JSON.

Works with

  • Excel 2016 or higher, or
  • Office 365, or
  • Excel Online

Advantage

  • Free
  • No download
  • No installation
  • Load only when needed
  • Load within Excel
  • No need coding in Python/JavaScript (for example)

Excel-to-JSON add-in

How to load this add-in

  • Steps
  1. Go to Excel 2016, Office365 or Excel Online.
  2. Insert Tab > My Add-ins.
  3. In the popup window, go to Office Store
  4. Search “Excel-to-JSON”.
  5. Add this add-in
  6. After loading, go to the “Excel-to-JSON” tab.

Now you are ready to use this add-in.

How to use this add-in

Example

Example Excel sheet - Source

Name Age Company
David 27 WTSolutions
Ton 26 WTSolutions
Kitty 30 Microsoft
Linda 30 Microsoft
Joe 40 Github

Example JSON - Output

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
[
{
"Name": "David",
"Age": 27,
"Company": "WTSolutions"
},
{
"Name": "Ton",
"Age": 26,
"Company": "WTSolutions"
},
{
"Name": "Kitty",
"Age": 30,
"Company": "Microsoft"
},
{
"Name": "Linda",
"Age": 30,
"Company": "Microsoft"
},
{
"Name": "Joe",
"Age": 40,
"Company": "Github"
}
]

How to get data from Cloudflare worker GET/POST requests

Cloudflare worker

Cloudflare Workers provides a serverless execution environment that allows you to create entirely new applications or augment existing ones without configuring or maintaining infrastructure.

Documentation for Cloudflare worker.

Cloudflare-worker-request-data

Getting data from Cloudflare-worker requests is not as easy as you were working with Express.js on Nodejs, it is necessary to understand the organization of request in Cloudflare-worker.

Cloudflare-worker-request-data is a JavaScript package released under MIT license, which can help you with getting data from a GET or POST request. With this package, it is not necessary to study the API of request from documentation file, and the usage is quite simple and straightforward.

Installation

1
npm i cloudflare-worker-request-data

Example

1
2
3
4
5
6
7
8
9
10
11
import { RequestData } from 'cloudflare-worker-request-data';

export default {
async fetch(request, env, ctx) {

const data = await RequestData(request)

// do something with the data

}
};

Description

RequestData(request) in the above example can get return of

  • a String in case of “application/text” or “text/html”
  • a Object in case of “application/json”, “application/x-www-form-urlencoded”, “mutipart/form-data”
  • a String which is empty if nothing parsed
  • The request shall be either in GET or POST, other methods of request will directly return you with an empty String.