Enhancement : Palette color creator

- Added import button on create palette dialog
- implemented import from images
- missing limitation on color count when importing !!
- should remove button when editing existing palette
This commit is contained in:
jdescottes
2014-09-07 14:31:28 +02:00
parent 8643f4402a
commit e457209c8f
12 changed files with 117 additions and 90 deletions

View File

@@ -14,6 +14,14 @@
reader.readAsDataURL(file);
},
readImageFile : function (file, callback) {
ns.FileUtils.readFile(file, function (content) {
var image = new Image();
image.onload = callback.bind(null, image);
image.src = content;
});
},
downloadAsFile : function (content, filename) {
var saveAs = window.saveAs || (navigator.msSaveBlob && navigator.msSaveBlob.bind(navigator));
if (saveAs) {