diff --git a/paint/sources/tab_textures.ts b/paint/sources/tab_textures.ts index db0f28f1..dfcfc612 100644 --- a/paint/sources/tab_textures.ts +++ b/paint/sources/tab_textures.ts @@ -150,7 +150,14 @@ function tab_textures_draw(htab: ui_handle_t) { if (!ends_with(f, ".png")) { f += ".png"; } - iron_write_png(path + path_sep + f, gpu_get_texture_pixels(target), target.width, target.height, 0); + + /// if IRON_BGRA + let buf: buffer_t = export_arm_bgra_swap(gpu_get_texture_pixels(target)); + /// else + let buf: buffer_t = gpu_get_texture_pixels(target); + /// end + + iron_write_png(path + path_sep + f, buf, target.width, target.height, 0); gpu_delete_texture(target); }, target); });