-
-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RangeError (index): Index out of range: index should be less than 3: 3 #673
Comments
if I do in the main:
I don't get the
some pixels are not valid (but their RGB values are correct) so doing the |
I think this is related to the fact that my image has a num get(int index, int channel) =>
channel < numChannels ? data[index * numChannels + channel] : 0;
called from: num _getChannel(int ci) => palette == null
? numChannels > ci
? _get(ci)
: 0
: palette!.get(_get(0), ci); but I'm not able to understand this code and what it is doing: int _get(int ci) {
var i = _index;
var bi = 7 - (_bitIndex + ci);
if (bi < 0) {
bi += 8;
i++;
}
if (i >= image.data.length) {
return 0;
}
return (image.data[i] >> bi) & 0x1;
} |
converting my input file not to use the palette removes the issue so there is something wrong with |
Here is the error I observe, I might do something wrong:
The input is a simple png of 5x5 yellow pixels.
Here is the code:
The error occurs on
num red = pixel.r;
(when I try to access the pixel value) in_tileToKey
my usage of
img.copyCrop
might be the issue.The text was updated successfully, but these errors were encountered: