diff --git a/lime/graphics/format/JPEG.hx b/lime/graphics/format/JPEG.hx index 07b286e0f..744103cd5 100644 --- a/lime/graphics/format/JPEG.hx +++ b/lime/graphics/format/JPEG.hx @@ -84,7 +84,7 @@ class JPEG { var bytes = @:privateAccess new Bytes (data.length, data.b); return ByteArray.fromBytes (bytes); - #elseif html5 + #elseif (js && html5) ImageCanvasUtil.sync (image, false); diff --git a/lime/graphics/format/PNG.hx b/lime/graphics/format/PNG.hx index c1ed94963..de622a2fe 100644 --- a/lime/graphics/format/PNG.hx +++ b/lime/graphics/format/PNG.hx @@ -139,7 +139,7 @@ class PNG { } - #elseif html5 + #elseif (js && html5) ImageCanvasUtil.sync (image, false);