    const canvas = document.createElement('canvas');
                                canvas.width = this.width * scale;
                                canvas.height = this.height * scale;
                                const ctx = canvas.getContext('2d');
                                ctx.fillStyle = '#ffffff';
                                ctx.fillRect(0, 0, canvas.width, canvas.height);
                                ctx.drawImage(this, 0, 0, canvas.width, canvas.height);
                          