BLOB

API Reference: Blob

Blob is "binary large object". It can be used for files without an handler or for a large chunk of raw data.

JavaScript
JavaScript
const Page = require("sf-core/ui/page");
const extend = require("js-base/core/extend");
const Image = require('sf-core/ui/image');
const ImageFormat = require('sf-core/ui/imageformat');
var Page1 = extend(Page)(
function(_super) {
_super(this, {
onShow: function(params) {
Application.statusBar.visible = false;
this.headerBar.visible = false;
}
});
var myImage = Image.createFromFile("images://smartface.png")
var blob = myImage.compress(ImageFormat.JPEG, 100);
var blobSize = blob.size;
var blobType = blob.type;
}
);