godot icon indicating copy to clipboard operation
godot copied to clipboard

[Core] Make ImageFormatLoader extensible.

Open Faless opened this issue 3 years ago • 5 comments
trafficstars

Make ImageFormatLoader RefCounted, expose it to extensions. There is an AVIF implementation (WIP) here: https://github.com/Faless/gd-avif/releases/tag/v0.0.1-godot-pr

spicy

Proposals to support esoteric image format: godotengine/godot-proposals#2461 godotengine/godot-proposals#3726

Draft status:

  • Is loader.add_format_loader okay?
  • Should we add class_name scripts like done in ResourceFormatLoader?
  • Should we add ResourceFormatLoader.add_custom_image_format_loader(String script_path);/ResourceFormatLoader.add_custom_image_format_loader_class(StringName p_class); (class_names and extensions?)

Faless avatar Jul 28 '22 20:07 Faless

I have MaterialX module that requires a StandardMaterial3D loader, but that's related but offtopic.

fire avatar Jul 28 '22 22:07 fire

I guess this needs the FileAccess bindings for this to work properly

reduz avatar Aug 11 '22 11:08 reduz

Blocked by #65271

Faless avatar Sep 19 '22 07:09 Faless

Blocked by #65271

Rebased on it, updated the PR and the avif module (not tagged yet).

Faless avatar Sep 19 '22 09:09 Faless

Should be good for review, let me know if you prefer it to be exposed as a separate ImageLoaderExtension class (CC @reduz ).

Faless avatar Sep 19 '22 18:09 Faless

Thanks!

akien-mga avatar Sep 20 '22 13:09 akien-mga