|
43 | 43 | <LoaderModal :loading_percentage="done_percentage" loading_title="Generating" :loading_desc="stable_diffusion.generation_state_msg"></LoaderModal> |
44 | 44 | </div> |
45 | 45 |
|
| 46 | + <p style="opacity:0.5; zoom:0.8"> Please describe image you want to draw in the box. </p> |
46 | 47 |
|
47 | 48 | </div> |
48 | 49 | </template> |
@@ -418,54 +419,7 @@ export default { |
418 | 419 | this.add_img_to_stage(img_path, true) |
419 | 420 | }, |
420 | 421 |
|
421 | | -
|
422 | | -
|
423 | | - // get_mask_of_box(){ |
424 | | - // let s = this.stage.scale().x |
425 | | - // let data_uri = this.images_layer.toDataURL({ |
426 | | - // pixelRatio: 3 , |
427 | | - // x: this.box.x() * s , |
428 | | - // y: this.box.y() * s , |
429 | | - // width: this.box.width() * s , |
430 | | - // height: this.box.height() * s } ); |
431 | | -
|
432 | | - // let canvas = document.createElement('canvas'); |
433 | | - // canvas.width = this.box.width() * s * 3 |
434 | | - // canvas.height = this.box.height() * s *3 |
435 | | -
|
436 | | - // let ctx = canvas.getContext("2d"); |
437 | | -
|
438 | | - // ctx.filter = ' grayscale(1) brightness(10000) contrast(10000)'; // blur('+filt_w+'px) |
439 | | - // ctx.fillStyle = "black"; |
440 | | - // ctx.fillRect(0, 0, canvas.width, canvas.height); |
441 | | - |
442 | | - // let myImage = new Image(); |
443 | | - // myImage.src = data_uri; |
444 | | -
|
445 | | - // myImage.onload = function() { |
446 | | - // ctx.drawImage(myImage , 0, 0); |
447 | | - // data_uri = canvas.toDataURL(); |
448 | | - // let img_url = window.ipcRenderer.sendSync('save_b64_image', data_uri , true ); |
449 | | - // console.log(img_url) |
450 | | - // }; |
451 | | - // }, |
452 | | -
|
453 | 422 | do_undo(){ |
454 | | - // if(! this.prev_canvas_b64) |
455 | | - // return; |
456 | | - // let myImage = new Image(); |
457 | | - // myImage.src = this.prev_canvas_b64 ; |
458 | | - // let that = this; |
459 | | - // myImage.onload = function() { |
460 | | - // var kimg = new Konva.Image({ |
461 | | - // x: 0, |
462 | | - // y: 0, |
463 | | - // image: myImage, |
464 | | - // width: 300, |
465 | | - // height: 300, |
466 | | - // }); |
467 | | - // that.images_layer.add(kimg) |
468 | | - // } |
469 | 423 | this.freeze_last_resizable_img() |
470 | 424 | let im = this.undo_history.pop() |
471 | 425 | im.img.destroy() |
|
0 commit comments