Coder Social home page Coder Social logo

identify.js's Introduction

identify.js

What is it doing?

With identify.js you can turn the output of ImageMagick's identify command into a javascript object.

Example

var Identify = require("identify")

// identify file and transform into json:
// you can pass options, if you want to
Identify.parseFile('test/fixtures/google.png', [, options], function(err, json) {
  console.log(json)
  /*
    {
      Format: 'PNG (Portable Network Graphics)',
      Class: 'PseudoClass',
      Geometry: '275x95+0+0',
      Resolution: '72x72',
      ...
    }
  */
})

// tansform an identify-output string into json
var identifyOutput = 'firstline\n  Format: PNG (Portable Network Graphics)\n'
console.log(Identify.parse(identifyOutput))
/*
  {
    Format: 'PNG (Portable Network Graphics)'
  }
*/

License

Released under MIT-License!

Authors/Contributors

identify.js's People

Contributors

sdepold avatar

Stargazers

node-migrator-bot avatar Christopher Mayfield avatar

Watchers

 avatar James Cloos avatar  avatar

identify.js's Issues

image with multiple IPTC keywords ignores all but one

I have an image where "identify -verbose" outputs this for the IPTC profile

Profile-iptc: 95 bytes
  unknown[1,0]: 
  City[1,90]: 0x00000000: 254700                                        -%
  unknown[2,0]: 
  Keyword[2,25]: Junction Box
  Keyword[2,25]: Karmann Ghia
  Caption[2,120]: This is a caption
  Keyword[2,25]: Goober-Beans

Identify.js gives me this - ignoring the first two Keyword items:

Profiles:
{ 'Profile-8bim': '136 bytes',
'Profile-APP1': '385 bytes',
'Profile-exif': '10506 bytes',
'Profile-iptc':
{ 'unknown[1,0]': '',
'City[1,90]': '0x00000000, 254700 -%',
'unknown[2,0]': '',
'Keyword[2,25]': 'Goober-Beans',
'Caption[2,120]': 'This is a caption' },
'Profile-xmp': '667 bytes' },

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.