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

Custom size node (for View Image) #782

Closed
0x4E69676874466F78 opened this issue Aug 20, 2022 · 3 comments · Fixed by #2167
Closed

Custom size node (for View Image) #782

0x4E69676874466F78 opened this issue Aug 20, 2022 · 3 comments · Fixed by #2167

Comments

@0x4E69676874466F78
Copy link

I want to see the view image node much larger than the other nodes, but there is no way to stretch it right now.
Using the zoom all the time is inconvenient.

@joeyballentine
Copy link
Member

I'm not sure how I didn't see this issue before now. It is definitely possible for us to add resizability to View Image nodes. However, the preview we display isn't actually the full image, it is a downscaled version of the image (if it is over a certain size). This was to prevent it from taking a long time to encode and send the image data to the frontend. So, you would not get much utility out of being able to expand the View Image node unless we increased the maximum resolution the images get resized to.

@0x4E69676874466F78
Copy link
Author

Is it possible to keep images in shared memory accessible between python and electron?
This would allow not to copy images once again.
But in general, need just set size preview enough to fit the new size node.

@joeyballentine
Copy link
Member

Is it possible to keep images in shared memory accessible between python and electron?
This would allow not to copy images once again.
But in general, need just set size preview enough to fit the new size node.

Even if you could share memory, the image would still need to be encoded in order for the frontend to display it at all. In the backend it's just a numpy array, which the frontend is not able to do anything with. It needs to be encoded to PNG to be able to be displayed at all.

As for how sharing memory would work, I have no idea if that's at all possible but I could look into it I guess. Would at least be more efficient to not have to send the data over a rest request.

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 a pull request may close this issue.

2 participants