Couple of edge cases are handled wrong #2
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I looked a bit through the code of this plugin (extremely readable btw :) ) and found a bug and couple things which are weird (note though that I don't have any experience writing GIMP plugins and haven't programmed in C for a long time, so I might wrongly think that something is wrong even though it's correct):
pixel_index > max_pixel_index + run
in line 280 should bepixel_index + run > max_pixel_index
.++column_index;
missing in the QOI_OP_RGB section.max_pixel_index
is technically speaking wrong, because what it actually stores is the length of the pixel array and the last (i.e. maximal) index is of course one less. (I know this is extremely nitpicky, but if I'm already unnecessarily complaining I can at least be thorough.)dr_db
variable which stores the values fordr
anddb
look like thedr_dg
anddb_dg
of the standard, but is completely different. (again: extremely nitpicky)