<commit_before>var isPlask = require('is-plask')
var plask = require('plask-wrap')

function loadImageBrowser (url, callback) {
  var img = new window.Image()
  img.onload = function () {
    callback(null, img)
  }
  img.src = url
}

function bgra2rgba (width, height, pixels) {
  var rgba = []
  for (var y = 0; y < height; y++) {
    for (var x = 0; x < width; x++) {
      var i = (x + y * width) * 4
      rgba.push(
        pixels[i + 2],
        pixels[i + 1],
        pixels[i + 0],
        pixels[i + 3]
      )<commit_msg>Add support for crossOrigin images<commit_after>var isPlask = require('is-plask')
var plask = require('plask-wrap')

function loadImageBrowser (url, callback, crossOrigin) {
  var img = new window.Image()
  if (crossOrigin) {
    img.crossOrigin = 'anonymous'
  }
  img.onload = function () {
    callback(null, img)
  }
  img.src = url
}

function bgra2rgba (width, height, pixels) {
  var rgba = []
  for (var y = 0; y < height; y++) {
    for (var x = 0; x < width; x++) {
      var i = (x + y * width) * 4
      rgba.push(
        pixels[i + 2],
        pixels[i + 1],
        pixels[i + 0],
        pixels[i + 3]
      )
{'fraction_non_alphanumeric': 0.1547104580812446, 'fraction_numerical': 0.013828867761452032, 'mean_word_length': 2.366279069767442, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1008842', 'n_tokens_mistral': 439, 'n_tokens_neox': 425, 'n_words': 121}