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

Fixed incorrect bytes order in RGB565 decoder #511

Closed
wants to merge 2 commits into from

Conversation

Lukas0025
Copy link

Bytes order of RGB565 is incorrect in function thats convert RGB565 to RGB888. This is reason for weird colors on image created from this code.

      camera_fb_t *fb = esp_camera_fb_get();

      auto psImageBuf =  (uint8_t*)ps_malloc(fb->width * fb->height * 2);

      //convert JPG to RGB565
      jpg2rgb565(fb->buf, fb->len, psImageBuf, JPG_SCALE_NONE);

      //convert back to JPG
      size_t len;
      uint8_t *data;
      fmt2jpg(psImageBuf, fb->width * fb->height * 2, fb->width, fb->height,  PIXFORMAT_RGB565, 30, &data, &len);

@github-actions
Copy link

This pull request appears to be stale. Please close it if its no longer valid.

@Lukas0025 Lukas0025 closed this Jun 5, 2023
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.

None yet

2 participants