Skip to content

WrapMemory Pointer and Resizing #1576

Answered by antonfirsov
ptasev asked this question in Q&A
Discussion options

You must be logged in to vote

Internally, ResizeProcessor works by creating a new buffer so it can work as destination, then in the end swapping that buffer with the original one. The reason to do this is that otherwise certain cases would be really hard to implement. For example imagine, you are resizing the image into the bottom right corner of the same image as destination. Without copying you would overwrite the bottom right part of the source image while resizing the top rows.

What we could consider is to relax the following requirement to be >= instead of expecting strict equality, so a smaller buffer can be copied into a larger one when swapping is not possible:

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ptasev
Comment options

Answer selected by ptasev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants