Guard against null bytes, use combine for svg.n path
This commit is contained in:
@@ -199,17 +199,24 @@ class IconHelper {
|
|||||||
|
|
||||||
if (image != null) {
|
if (image != null) {
|
||||||
|
|
||||||
|
var data = null;
|
||||||
|
|
||||||
if (size < 256) {
|
if (size < 256) {
|
||||||
|
|
||||||
imageData.push (BMP.encode (image, ICO));
|
data = BMP.encode (image, ICO);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
imageData.push (image.encode ("png"));
|
data = image.encode ("png");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
images.push (image);
|
if (data != null) {
|
||||||
|
|
||||||
|
imageData.push (data);
|
||||||
|
images.push (image);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class ImageHelper {
|
|||||||
|
|
||||||
// try using Lime "legacy" to rasterize SVG first, since it is much faster
|
// try using Lime "legacy" to rasterize SVG first, since it is much faster
|
||||||
|
|
||||||
ProcessHelper.runCommand ("", "neko", [ PathHelper.getHaxelib (new Haxelib ("lime")) + "/svg.n", "process", path, Std.string (width), Std.string (height), temp ], true, true);
|
ProcessHelper.runCommand ("", "neko", [ PathHelper.combine (PathHelper.getHaxelib (new Haxelib ("lime")), "svg.n"), "process", path, Std.string (width), Std.string (height), temp ], true, true);
|
||||||
|
|
||||||
if (FileSystem.exists (temp)) {
|
if (FileSystem.exists (temp)) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user