mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 10:24:44 -04:00
Fixed exporting PNGs
This commit is contained in:
parent
2a5dfa7ea2
commit
9812a34b8b
2 changed files with 6 additions and 2 deletions
|
@ -77,7 +77,7 @@ func save_sprite(canvas : Canvas, path : String) -> void:
|
|||
for layer in canvas.layers:
|
||||
var img : Image = layer[0]
|
||||
img.lock()
|
||||
if layer[4] < 1: # If we have layer transparency
|
||||
if layer[2] < 1: # If we have layer transparency
|
||||
for xx in img.get_size().x:
|
||||
for yy in img.get_size().y:
|
||||
var pixel_color := img.get_pixel(xx, yy)
|
||||
|
@ -132,7 +132,7 @@ func save_spritesheet() -> void:
|
|||
for layer in canvas.layers:
|
||||
var img : Image = layer[0]
|
||||
img.lock()
|
||||
if layer[4] < 1: # If we have layer transparency
|
||||
if layer[2] < 1: # If we have layer transparency
|
||||
for xx in img.get_size().x:
|
||||
for yy in img.get_size().y:
|
||||
var pixel_color := img.get_pixel(xx, yy)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue