Specify dimensions when saving an image
- Dominant language
- Python
- Stars
- 5.7k
- Forks
- 1.1k
- Avg merge
- 12d 2h
- Merged PRs (30d)
- 1
Description
**What's your use case?**
Visualizations, like the scatter plot, allow you to save an image. The dimensions of the resulting image appear to be based on the plot's window size when hitting the "Save Image" button.
I would like to be able to save images with consistent dimensions each time I run the workflow. I can resize the image outside of Orange, but that tends to make things like the axis labels unreadable. Therefore, the image would need to be rendered for a viewport that matches the specified dimensions.
Additionally, it would be great if the dimensions could be saved in the widget's configuration so they didn't need to be specified each time an image is saved.
**What's your proposed solution?**
When the user presses the "Save image" button on a visualization, they are prompted to specify dimensions. The first time they save it, the default dimensions match the window size. If the user changes those values, then subsequent attempts to save the image uses the new values as the default.
It would be nice if the dimension override values were specific to that instance of the widget (i.e., did not affect others in the workflow) and they persisted in the .ows file the next time it was opened.
**Are there any alternative solutions?**
I don't think so.
Contributor guide
Research direction
Start by locating the visualization widgets' Save Image action and the widget configuration or serialization code. Trace how the current window dimensions are read, then determine how per-widget dimensions can be prompted for, reused, and persisted in the .ows file; done means saved images use the requested viewport dimensions and reopen with those values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100