openframeworks / openframeworks/openFrameworks

ofImage.load() should fail with images too big to be shown

Open
#6,533 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

ofImage img; //img bigger than max texture size supported by GPU
img.load("big_image.png"); //load fine
img.draw(0,0); //nothing shown, but white background

Fore more detailed info see this forum post https://forum.openframeworks.cc/t/problem-displaying-big-image/34394/

loading such a big image should fail, or at least generate some kind of warning. Maybe some warning is better, because the image in fact is correctly loaded (and accessible to crop/resize/etc.). It's draw()ing them that fails, not loading

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the implementations of ofImage.load() and ofImage.draw(), then trace how images larger than the GPU's maximum texture size are handled. Decide whether the intended result is a warning or a load failure, and add coverage showing that oversized images no longer fail silently when drawn.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.