Skip to content

Commit 186b9aa

Browse files
klakhovzoe-seo
authored andcommitted
Fix image scaling on image filter application (cvat-ai#10111)
UI has limited decoding capabilities, then the image is scaled. The image scaling was not applied when image filter was applied, that can lead to image reducing its size.
1 parent 912ae37 commit 186b9aa

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
### Fixed
2+
3+
- Image scaling was not applied when image filter is enabled
4+
(<https://github.com/cvat-ai/cvat/pull/10111>)

cvat-ui/src/components/annotation-page/canvas/views/canvas2d/canvas-wrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ class CanvasWrapperComponent extends React.PureComponent<Props> {
992992

993993
const offscreen = new OffscreenCanvas(renderWidth, renderHeight);
994994
const ctx = offscreen.getContext('2d') as OffscreenCanvasRenderingContext2D;
995-
ctx.drawImage(imageBitmap, 0, 0);
995+
ctx.drawImage(imageBitmap, 0, 0, renderWidth, renderHeight);
996996
const imageData = ctx.getImageData(0, 0, renderWidth, renderHeight);
997997

998998
const newImageData = imageFilters

0 commit comments

Comments
 (0)