3 more issues with ktx create and EXR loading

Aperta
#971 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
cpp

Direzione di ricerca

Inizia leggendo tools/imageio/exr.imageio/exrinput.cc intorno alla riga 227 e confronta la gestione esistente dei canali con il Garden.exr collegato e i casi senza canali riconosciuti. Il lavoro è completato quando i file EXR senza canali riconosciuti vengono rifiutati e un singolo canale Y è supportato come texture in scala di grigi, incluso il comportamento di output indicato per RGB/RGBA rispetto a R.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

in addition to #966 and #970.

  • .exr files with lineOrder != 0 are being loaded with the image upside down. This is due to a bug or feature in TinyEXR (see https://github.com/syoyo/tinyexr/issues/213) and can be worked around, at least with the files tested so far, by adding the line
header.line_order = 0;

before https://github.com/KhronosGroup/KTX-Software/blob/b6190046bbf71e0fbf9e7a964f6ee39d726b16be/tools/imageio/exr.imageio/exrinput.cc#L227. https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr-images/main/ScanLines/Blobbies.jpg has lineOrder 1, decreasing Y.

Fixed in https://github.com/KhronosGroup/KTX-Software/commit/91e61d6fa3f06eb8616fc2eba74fba7703e4fe11.

  • If the .exr file contains no recognized channels ktx create creates an empty texture. It should raise an error. Only R,G,B and A are currently recognized.
  • A single channel "Y" should be recognized and a greyscale texture created. Probably handling should follow the same model as PNG L textures which IIRC is to replicate the channel to all 3 if the output format is RGB{,A} or add swizzle metadata if the output format is R. The EXR spec does not specifically call out YA textures so it is unclear if those exist and should be supported. For now only supporting only Y is good. A .exr with a single Y channel is https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr-images/main/LuminanceChroma/Garden.exr.
Lingua principale
C++
Stelle
1.4k
Fork
328
Merge medio
20h 40m
PR unite (30g)
18

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di KhronosGroup/KTX-Software

Tutte le issue di KhronosGroup/KTX-Software

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.