Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #19397 from justindarc/bug1006281-v1.4
Browse files Browse the repository at this point in the history
Bug1006281 v1.4
  • Loading branch information
justindarc committed May 19, 2014
2 parents 6edb703 + abaccdb commit 17b102e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion apps/camera/js/controllers/camera.js
Expand Up @@ -126,7 +126,12 @@ CameraController.prototype.onSettingsConfigured = function() {
debug('camera configured with final settings');

// TODO: Move to a new StorageController (or App?)
var maxFileSize = (pictureSize.width * pictureSize.height * 4) + 4096;
//
// It is very unlikely that a JPEG file will have a file size that is
// more than half a byte per pixel. There is some fixed EXIF overhead
// that is the same for small and large pictures, however, so we add
// an additional 25,000 bytes of padding.
var maxFileSize = (pictureSize.width * pictureSize.height / 2) + 25000;
this.storage.setMaxFileSize(maxFileSize);
};

Expand Down
4 changes: 2 additions & 2 deletions apps/camera/test/unit/media_frame_test.js
Expand Up @@ -68,8 +68,8 @@ suite('Media Frame Unit Tests', function() {
var preview = {
'start': 1,
'end': 2,
'width': 1000,
'height': 1000
'width': 1600,
'height': 1200
};
frame.displayImage(dummyBlob, 1600, 1200, preview, 0, false);
assert.isTrue(frame.displayingPreview);
Expand Down

0 comments on commit 17b102e

Please sign in to comment.