Fix GIF reference images potentially not saving correctly

This commit is contained in:
JannisX11 2023-05-31 22:08:50 +02:00
parent 3d95d0d8b7
commit 5d1c432016

View File

@ -82,7 +82,7 @@ class ReferenceImage {
for (let key in ReferenceImage.properties) {
if (this[key] != ReferenceImage.properties[key].default) ReferenceImage.properties[key].copy(this, copy);
}
if (isApp && copy.source && !copy.source.startsWith('data:')) {
if (isApp && copy.source && !copy.source.startsWith('data:') && copy.source.match(/\.(png|jpg|jpeg)$/i)) {
let frame = new CanvasFrame(this.img);
copy.source = frame.canvas.toDataURL('image/png');