
#HOW TO INSTALL LIBGD ON CENTOS 7 INSTALL SOFTWARE#
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Since December 27th 2012, node-gd is licensed under an MIT license.Ĭopyright (c) 2010-2018 the contributors. An example of this is the creation of animated GIFs. Some output functions are synchronous because they are handled by libgd. openFile ( '/path/to/file.jpg', function ( err, img ) ) ExamplesĮxample of synchronously creating a rectangular image with a bright green background and in magenta the text "Hello world!" This means that you should either change all gd.create calls to gd.createSync and gd.createTrueColor to gd.createTrueColorSync or rewrite those call and wrap further calls in a callback. Since gd.create and gd.createTrueColor are async.

APIįull API documentation and more examples can be found in the docs directory or at the dedicated github page.

gd.create() will create a palette-based base image while gd.createTrueColor() will create a true color image. GIFs are always palette-based, PNGs can be both palette-based or true color. There are different flavours of images, of which the main ones are palette-based (up to 256 colors) and true color images (millions of colors). $ npm install node-gd Will not build on Windows!
