openframeworks / openframeworks/openFrameworks
ofImage seems redundant (long term)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
While writing issue #1690, I started questioning why ofImage exists as a class that can be instantiated.
In my mind it seems that ofImage is really a container of ofTexture and ofPixels with load/save routines.
- With ofLoadImage() we can already directly load to ofPixels and ofTexture.
- It almost never makes sense to use a bunch of ofImages over a combination of ofTexture/ofPixels other than to (maybe) save a few lines of code.
ofImage seems to me like a shortcut for very simple tasks, like loading and displaying one image really easily. Beyond that, for more advanced tasks, I think it can get a bit confusing to use, and actually less useful once you have to start using setUseTexture(false), for example.
I'm sure there are a lot of valuable use cases for ofImage that make it convenient for beginners to learn oF, but I also think it makes things more confusing later down the line to have to learn about the difference between main memory and GFX memory. In an OpenGL focused graphics library, this concept is very important.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with issue #1690 and compare the stated roles of ofImage, ofLoadImage(), ofTexture, ofPixels, and setUseTexture(false). Done requires a maintainer decision on whether the long-term API should change; this issue names no files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100