Skip to content

Commit

Permalink
Merge pull request #94 from mrkmg/master
Browse files Browse the repository at this point in the history
Modularize module for easier maintenance and future enhancements
  • Loading branch information
mrkmg authored Jan 10, 2018
2 parents 9d6ef71 + f3f4441 commit 49ac7b9
Show file tree
Hide file tree
Showing 15 changed files with 1,062 additions and 547 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
sudo: required
language: node_js
node_js:
- "node"
- "lts/*"
- "0.10"
- "0.8"
before_install:
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ easyimg.crop(<options>) - to crop an image.
easyimg.thumbnail(<options>) - to create square thumbnails.
easyimg.rescrop(<options>) - to resize and crop and image in one go, useful for creating customzied thumbnails.
easyimg.rotate(<options>) - to rotate an image.
easyimg.exec(<command>) - when you want to call a custom command to ImageMagick, you will need to take care of escaping special characters etc.
easyimg.execute(<command>, <arguments>) - when you want to call a custom command to ImageMagick. Pass arguments as an array.
```
**NOTE**: `easyimg.exec()` spawns a subshell.
**NOTE**: `easyimg.exec()` spawns a subshell, and has been deprecated. It can not detect the version of ImageMagick to ensure proper execution. Please use the `easyimg.execute()` function moving forward.

The EasyImage options object can have these properties depending on the method. Unrelated options are ignored.

Expand Down Expand Up @@ -82,11 +82,11 @@ easyimg.rescrop({
width:500, height:500,
cropwidth:128, cropheight:128,
x:0, y:0
}).then(
function(image) {
})
.then(function(image) {
console.log('Resized and cropped: ' + image.width + ' x ' + image.height);
},
function (err) {
})
.catch(function (err) {
console.log(err);
}
);
Expand All @@ -111,4 +111,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 49ac7b9

Please sign in to comment.