Files
lcd-image-converter/resources/scan_scripts/pixels_example.js
2017-10-02 23:49:25 +05:00

10 lines
250 B
JavaScript

// 'argb' - pixel's data of type uint32
var a = (argb >> 24) & 0xff;
var r = (argb >> 16) & 0xff;
var g = (argb >> 8) & 0xff;
var b = (argb >> 0) & 0xff;
// place modified value back to variable 'argb'
argb = (a << 24) | (r << 16) | (g << 8) | b;