KhronosGroup / KhronosGroup/WebGL
texImage2D, source image not decodable: unspecified behavior
- Dominant language
- HTML
- Stars
- 2.9k
- Forks
- 703
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 4
Description
The spec does not say what texImage2d is supposed to do when the source image is not fully decodable, for example when it is and HTMLImageElement whose image resource is a corrupted image file.
Since it is necessary to attempt to decode the image in order to determine whether it is "fully decodable", it would be best if the error handling behavior were asynchronous (e.g. texture is blank). Any synchronous error handling (e.g. throwing an exception) would be bad because it would force implementations to decode images synchronously, thus preventing image decode from being done on another thread/process.
Contributor guide
Research direction
Start by reviewing the texImage2D behavior and the HTMLImageElement decoding case described in the issue, then inspect the relevant WebGL specification text. Determine an agreed asynchronous behavior for corrupted or not-fully-decodable images; the work is done when the specification clearly defines that behavior without requiring synchronous decoding.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- api, computer-graphics
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100