Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

png-image

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

png-image - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

10

CHANGELOG.md

@@ -0,1 +1,11 @@

<a name="1.2.0"></a>
# [1.2.0](https://github.com/koola/png-image/compare/v1.1.1...v1.2.0) (2017-01-05)
### Features
* **compose:** add writeImage and toBuffer methods ([40a8f95](https://github.com/koola/png-image/commit/40a8f95))
<a name="1.1.1"></a>

@@ -2,0 +12,0 @@ ## [1.1.1](https://github.com/koola/png-image/compare/v1.1.0...v1.1.1) (2016-12-28)

@@ -21,2 +21,8 @@ ## Classes

</dd>
<dt><a href="#writeImage">writeImage(instance)</a> ⇒ <code>promise</code></dt>
<dd><p>Writes the image to the filesystem</p>
</dd>
<dt><a href="#toBuffer">toBuffer(instance)</a> ⇒ <code>promise</code></dt>
<dd><p>Writes the image to the filesystem</p>
</dd>
</dl>

@@ -78,1 +84,25 @@

**Access:** public
<a name="writeImage"></a>
## writeImage(instance) ⇒ <code>promise</code>
Writes the image to the filesystem
**Kind**: global function
**Access:** public
| Param | Type | Description |
| --- | --- | --- |
| instance | <code>this</code> | PNG-image |
<a name="toBuffer"></a>
## toBuffer(instance) ⇒ <code>promise</code>
Writes the image to the filesystem
**Kind**: global function
**Access:** public
| Param | Type | Description |
| --- | --- | --- |
| instance | <code>this</code> | PNG-image |

26

index.js

@@ -82,3 +82,3 @@ 'use strict';

}
return this._writeImage(this._image, this._imageOutputPath);
return promise.resolve(this);
});

@@ -181,2 +181,26 @@ }

*
* @method writeImage
* @param {this} instance PNG-image
* @returns {promise}
* @public
*/
writeImage(instance = this) {
return instance._writeImage(instance._image, instance._imageOutputPath);
}
/**
* Writes the image to the filesystem
*
* @method toBuffer
* @param {this} instance PNG-image
* @returns {promise}
* @public
*/
toBuffer(instance = this) {
return promise.resolve(PNG.sync.write(instance._image));
}
/**
* Writes the image to the filesystem
*
* @method _writeImage

@@ -183,0 +207,0 @@ * @param {string} filePath Path to save file

2

package.json
{
"name": "png-image",
"version": "1.1.1",
"version": "1.2.0",
"description": "Crop and save PNGs",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc