vseventer / sharp-cli

CLI for sharp.
MIT License
189 stars 20 forks source link

Allow metadata retrieval #67

Open vseventer opened 2 years ago

vseventer commented 2 years ago

This Pull Request:

Example

An example of the resulting metadata (WIP):

{
  input: {
    format: 'jpeg',
    size: 30985,
    width: 500,
    height: 331,
    space: 'srgb',
    channels: 3,
    depth: 'uchar',
    density: 72,
    chromaSubsampling: '4:2:0',
    isProgressive: false,
    hasProfile: false,
    hasAlpha: false,
    path: 'input.jpg'
  },
  output: {
    format: 'jpeg',
    width: 200,
    height: 132,
    channels: 3,
    premultiplied: false,
    size: 7742,
    path: 'output.jpg'
  }
}

Things to Note: