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

gdimage

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gdimage - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

package.json
{
"name": "gdimage",
"version": "0.0.2",
"version": "0.0.3",
"description": "",

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

@@ -43,3 +43,3 @@ ## Yet Another GD Graphics Library Wrapper For Node.JS

```js
function create(int width, int height, boolean trueColor = true): GDImage
function create(width:int, height:int, trueColor:boolean = true): GDImage
```

@@ -64,3 +64,3 @@

```js
function decode(Buffer buf, string format = 'auto'): GDImage
function decode(buf:Buffer, format:string = 'auto'): GDImage
```

@@ -89,4 +89,4 @@

function trueColor(r, g, b, a): Color
function trueColor(string rgb): Color
function trueColor(string rgba): Color
function trueColor(rgb:string): Color
function trueColor(rgba:string): Color
```

@@ -149,10 +149,6 @@

```js
function getColor(int r, int g, int b, int a = 1): Color
function getColor(string rgb): Color
function getColor(string rgba): Color
```
Gets an existing color from the color space. If none matching, an exception is thrown.
`image.getColor` accepts same arguments as `gd.trueColor`.
Not that `image.GetColor` acts like `gd.trueColor` in true color mode, it will never fail.

@@ -164,2 +160,4 @@

`image.getClosestColor` accepts same arguments as `gd.trueColor`.
Not that `image.GetColor` acts like `gd.trueColor` in true color mode, it will never fail.

@@ -177,3 +175,3 @@

```js
function scale(int new_width, int new_height, boolean auto_destroy = false): GDImage
function scale(new_width:int, new_height:int, auto_destroy:boolean = false): GDImage
```

@@ -188,3 +186,3 @@

```js
function rotate(float angle, Color bg_color = null, boolean auto_close = false): GDImage
function rotate(angle:float, bg_color:Color = null, auto_close:boolean = false): GDImage
```

@@ -200,3 +198,3 @@

```js
function line(int x1, int y1, int x2, int y2, Color color, boolean anti_aliased = false): GDImage
function line(x1:int, y1:int, x2:int, y2:int, color:Color, anti_aliased:boolean = false): GDImage
```

@@ -211,6 +209,6 @@

```js
function text(string str, int x, int y, double size, Color color, double angle = 0, string font = "arial"): GDImage
function text(str:string, x:int, y:int, size:double, color:Color, angle:float = 0, font:string = "arial"): Array.<number>
```
Writes text with true type font, returns a rect which wraps the text.
Writes text with true type font, returns a rect which wraps the text. Only true type fonts are supported.

@@ -259,3 +257,3 @@ Parameters:

```js
function encode(string format, boolean auto_close = false): Buffer
function encode(format:string, auto_close:boolean = false): Buffer
```

@@ -262,0 +260,0 @@

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