mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-01-18 15:26:19 +08:00
Fix GIF reference images potentially not saving correctly
This commit is contained in:
parent
3d95d0d8b7
commit
5d1c432016
@ -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');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user