Commit 4de984de authored by Oleg Korshul's avatar Oleg Korshul

window["IsEmbedImagesInInternalFormat"] flag

parent 23326ceb
......@@ -2333,7 +2333,22 @@ function CBinaryFileWriter()
oThis.image_map[_src] = true;
if (oThis.IsUseFullUrl)
if (window["IsEmbedImagesInInternalFormat"] === true)
{
var _image = editor.ImageLoader.map_image_index[AscCommon.getFullImageSrc2(_src)];
if (undefined !== _image)
{
var imgNatural = _image.Image;
var _canvas = document.createElement("canvas");
_canvas.width = imgNatural.width;
_canvas.height = imgNatural.height;
_canvas.getContext("2d").drawImage(imgNatural, 0, 0, _canvas.width, _canvas.height);
_src = _canvas.toDataURL("image/png");
}
}
else if (oThis.IsUseFullUrl)
{
if ((0 == _src.indexOf("theme")) && window.editor)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment