dansreis / dansreis/react-canvas-annotator

Method `getObjectContext` returns base64 image with incorrect orientation

Open
#177 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
10
Forks
1
PR merge metrics
No merged PRs in 30d

Description

**Description:**
The getObjectContext method in the react-canvas-annotator library is currently returning base64 encoded images with incorrect orientation. This bug needs to be addressed to ensure that the returned images maintain the correct orientation as displayed on the canvas.

**Steps to Reproduce:**

Use the getObjectContext method to get the base64 representation of an image on the canvas.
Observe that the orientation of the returned base64 image does not match the orientation of the image as displayed on the canvas.

**Expected Behavior:**
The getObjectContext method should return a base64 encoded image that matches the orientation of the image on the canvas.

**Actual Behavior:**
The returned base64 encoded image has an incorrect orientation compared to the image on the canvas.

**Proposed Solution:**
Investigate the code in the getObjectContext method to identify where the orientation handling is failing.
Update the method to correctly account for the orientation of the image.
Add tests to ensure that images are returned with the correct orientation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.