Skip to content

Releases: Datamosh-js/datamosh

v1.4.1

10 Jul 01:19
Compare
Choose a tag to compare

Changes:

  • Improve documentation

v1.4.0

07 Jul 00:43
Compare
Choose a tag to compare

Changes:

  • Support passing multiple modes as array
  • Clean up error messages

Example code:

;(function throwAnElbow () {
  let read = require('fs').readFileSync
  let write = require('fs').writeFileSync

  let img = read('/path/to/read/in.jpg')
  require('./index')(
    {
      read: img,
      mode: ['vana', 'veneneux', 'fatcat']
    },
    (err, moshedImg) => {
      if (err) return console.error(err)

      console.log('Moshing Completed!')
      write('/path/to/write/out.jpg', moshedImg)
    }
  )
})()

v1.3.0

06 Jul 02:41
Compare
Choose a tag to compare

Adds features:

  • Input options.read may be a buffer.
  • If options.write is unspecified, the moshed image will be returned as a buffer via the provided callback (previously Jimp obj)

v1.2.1

05 Jul 03:36
Compare
Choose a tag to compare

Adds a new mode:

  • fatcat: the most mosh-centric mode to date. Completely obliterates your image, have fun!

NOTE-FROM-AUTHOR:
Just a bit on releases. New modes will NOT constitute a new minor version. All mode additions will be treated as patches from v1.2.1 forward.

Cheers,
@mster

v1.2.0

05 Jul 01:55
Compare
Choose a tag to compare

Adds two new modes:

  • veneneux: which applies mosh-centric styles.
  • vana: applies an instagram like oversaturation. Vana's source may be refined in future releases.

v1.1.0

25 Jun 06:53
Compare
Choose a tag to compare

Add custom modes via function prop MODES

let m = require('./index')

console.log(m.MODES)
/*
{ blurbobb: [Function], schifty: [Function] }
*/

m.MODES.boop = function (original) {
  const bitmapData = original.bitmap.data
  const data = Buffer.from(bitmapData)

  // manipulate data here

  original.bitmap.data = data
  return original
}
console.log(m.MODES)
/*
{ blurbobb: [Function], schifty: [Function], boop: [Function] }
*/

m(
  {
    read: '/home/m/Desktop/0.jpeg',
    write: '/home/m/Desktop/1.jpeg',
    mode: 'boop'
  },
  (err, data) => {
    if (err) return console.error(err)

    console.log('Moshing Completed!')
  }
)

console.log(m.MODES)
/*
{ blurbobb: [Function], schifty: [Function], boop: [Function] }
*/

v1.0.1

06 Apr 02:09
Compare
Choose a tag to compare
v1.0.1

v1.0.0

06 Apr 02:03
Compare
Choose a tag to compare
v1.0.0 Pre-release
Pre-release
v1.0.0