mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user