Closed DTraitor closed 1 year ago
dmi_strip_metadata leads to removing alpha channel from the icon Here is the code I used:
dmi_strip_metadata
/world fps = 25 icon_size = 32 view = 6 /mob/Login() var/icon/test = icon('twitcher.dmi', "preview") fcopy(test, "temp.png") client << browse_rsc(icon("temp.png"), "first.png") call("rust_g", "dmi_strip_metadata")("temp.png") сlient << browse_rsc(icon("temp.png"), "second.png")
twitcher.dmi: https://cdn.discordapp.com/attachments/693217263934898190/1111983453760651324/twitcher.dmi
twitcher.dmi
Code result: first.png: second.png:
first.png
second.png
Yeah, not copying tRNS chunk from the original.
if let Some(trns_chunk) = reader_info.trns.to_owned(){ encoder.set_trns(trns_chunk); }
Simple fix, under palette copy.
dmi_strip_metadata
leads to removing alpha channel from the icon Here is the code I used:twitcher.dmi
: https://cdn.discordapp.com/attachments/693217263934898190/1111983453760651324/twitcher.dmiCode result:
first.png
:second.png
: