Skip to content
This repository has been archived by the owner on Mar 12, 2019. It is now read-only.

Commit

Permalink
Changing the main parameters to booleans
Browse files Browse the repository at this point in the history
fixing the problem with android's illegal casting.
  • Loading branch information
RaananW committed Apr 13, 2015
1 parent 7439108 commit 0b4fa1e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions www/imageresize.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ImageResizer.FORMAT_PNG = "png";
* filename : filename of stored resized image
* photoAlbum : whether to store the image in the photo album (1) or temporary directory of the app (0)
* @returns JSON Object with the following parameters:
* imageData : Base64 of the resized image || OR filename if storeImage = 1
* imageData : Base64 of the resized image || OR filename if storeImage = true
* height : height of the resized image
* width: width of the resized image
*/
Expand All @@ -57,11 +57,11 @@ ImageResizer.prototype.resizeImage = function(success, fail, imageData, width, h
imageDataType: options.imageDataType ? options.imageDataType : ImageResizer.IMAGE_DATA_TYPE_URL,
resizeType: options.resizeType ? options.resizeType : ImageResizer.RESIZE_TYPE_MAX_PIXEL,
quality: options.quality ? options.quality : 75,
storeImage: (typeof options.storeImage !== "undefined") ? options.storeImage : 0,
pixelDensity: (typeof options.pixelDensity !== "undefined") ? options.pixelDensity : 1,
storeImage: (typeof options.storeImage !== "undefined") ? options.storeImage : false,
pixelDensity: (typeof options.pixelDensity !== "undefined") ? options.pixelDensity : true,
directory: options.directory ? options.directory : "",
filename: options.filename ? options.filename : "",
photoAlbum: (typeof options.photoAlbum !== "undefined") ? options.photoAlbum : 0
photoAlbum: (typeof options.photoAlbum !== "undefined") ? options.photoAlbum : false
};

if (params.filename && params.filename.indexOf('.') > -1) {
Expand Down

0 comments on commit 0b4fa1e

Please sign in to comment.