Skip to content

ossia binding: file view sized from bytes read; average-color example covers its input - #213

Merged
jcelerier merged 2 commits into
mainfrom
score/gfx-fixes-2026-09
Sep 25, 2026
Merged

jcelerier merged 2 commits into
mainfrom
score/gfx-fixes-2026-09

Conversation

@jcelerier

@jcelerier jcelerier commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Two fixes needed by the score graphics branch (ossia/score#2303).

  • ossia binding: size a file view from the bytes read. A text-mode read drops every carriage return, so sizing the view from the file's size on disk ran it past the end of the buffer. The view now covers the bytes actually read.
  • examples: the average-color compute example averages its whole input. It wrote with a fixed stride of 16 past its buffer, covered at most 256×256 pixels, and divided by the block count instead of the pixel count. The score-side test test_gfx_average_color_fixg pins the fixed behaviour.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JeL19ofVgPe9u9q7J1V9ex

jcelerier and others added 2 commits September 24, 2026 11:09
It wrote with a fixed stride of 16 past its buffer, covered at most 256x256
pixels and divided by the block count instead of the pixel count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeL19ofVgPe9u9q7J1V9ex
A text-mode read drops every carriage return, so the file's size on disk
ran the view past the end of the buffer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JeL19ofVgPe9u9q7J1V9ex
@jcelerier
jcelerier merged commit 99b3ae3 into main Sep 25, 2026
4 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant