xceling-utilities v0.0.40
The following modules have been written to a) provide me some useful functions in my site development, and b) provide me with a means to stretch my programming experience and expertise. These modules are not necessarily the ones you want.
FileSystemUtilities examples:
The FileSystemUtilities module provides non-NodeJS provided file system handling utilities.
NOTE: The ImageLimiter module requires ImageMagick.
The ImageLimiter module is designed to provide an interface between your NodeJS app and ImageMagick using a command line calling procedure combined with multithreading of image manipulation to keep the NodeJS server from locking up.
ImageLimiter examples:
imagelimiter = require('xceling-utilities/imagelimiter'); im = new imagelimiter();
im.getImageInfo('location of file', function(err, obj) { console.log('>>>> ' + console.inspect(obj)); });
im.getCachedImage('crop=right&height=200&width=180&rounded_corners=60&source_image=location of file&image_cache=directory to look for cached images in, function(err, data) { console.log('getCachedImage.png err: ' + err); console.log('getCachedImage.png data: ' + data); }); im.getCachedImage('crop=left&height=300&width=600&rounded_corners=120&source_image=location of file&image_cache=directory to look for cached images in, function(err, data) { console.log('getCachedImage.jpg err: ' + err); console.log('getCachedImage.jpg data: ' + data); });
im.getCachedImage('crop=topleft&height=300&width=300&source_image=location of file&image_cache=directory to look for cached images in, function(err, data) { }); im.getCachedImage('preferred_aspect=height&height=400&width=95&source_image=location of file&image_cache=directory to look for cached images in, function(err, data) { });
im.getCachedImage('resize=1&height=100&width=200&source_image=location of file&image_cache=directory to look for cached images in, function(err, data) { console.log('Error: ' + err); console.log('Data: ' + data); });