Skip to content
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

[3.0] Image::_get_pixelb bugged? #8158

Closed
CharlesWoodhill opened this issue Mar 26, 2017 · 0 comments
Closed

[3.0] Image::_get_pixelb bugged? #8158

CharlesWoodhill opened this issue Mar 26, 2017 · 0 comments

Comments

@CharlesWoodhill
Copy link

CharlesWoodhill commented Mar 26, 2017

Operating system or device - Godot version:
N/A - current master

Issue description:
Possible bug in Image::_get_pixelb:

void Image::_get_pixelb(int p_x, int p_y, uint32_t p_pixelsize, const uint8_t *p_src, uint8_t *p_dst) {

	uint32_t ofs = (p_y * width + p_x) * p_pixelsize;

	for (uint32_t i = 0; i < p_pixelsize; i++) {
		p_dst[ofs] = p_src[ofs + i]; // <<<<<<<<<<<<
	}
}

i think:
p_dst[ofs] = p_src[ofs + i];
should be:
p_dst[i] = p_src[ofs + i];

Steps to reproduce:
N/A

Link to minimal example project:
why i need that private member?:
https://godotengine.org/qa/13482

@CharlesWoodhill CharlesWoodhill changed the title Image::_get_pixelb bugged? [3.0] Image::_get_pixelb bugged? Mar 26, 2017
@akien-mga akien-mga added this to the 3.0 milestone Mar 27, 2017
@27thLiz 27thLiz closed this as completed Apr 24, 2017
groscalin pushed a commit to groscalin/godot that referenced this issue Jul 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants