Fix #2638 - Studio: export image dialog crashes on open after an oversized image size is entered - #2639
Merged
Merged
Conversation
…sized image size is entered An export size past GL_MAX_RENDERBUFFER_SIZE aborted Studio from inside Apple's GL-on-Metal layer, and because the size was saved before it was rendered, the dialog restored it and died again on every subsequent open. export_to_pixmap now queries the hardware limit and renders anything larger as tiles stitched by vtkWindowToImageFilter, and the size is stored only once a render has survived it. Along the way: vtk_image_to_qimage no longer overflows its int index past two gigapixels, the preview renders capped instead of at full export size, the progress bar actually paints, and oversized values clamp to a budget explained in the dialog. Export is now the default button, the size fields follow the override checkbox, and there are view-multiple presets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An export size past GL_MAX_RENDERBUFFER_SIZE aborted Studio from inside Apple's GL-on-Metal layer, and because the size was saved before it was rendered, the dialog restored it and died again on every subsequent open. export_to_pixmap now queries the hardware limit and renders anything larger as tiles stitched by vtkWindowToImageFilter, and the size is stored only once a render has survived it.
Along the way: vtk_image_to_qimage no longer overflows its int index past two gigapixels, the preview renders capped instead of at full export size, the progress bar actually paints, and oversized values clamp to a budget explained in the dialog. Export is now the default button, the size fields follow the override checkbox, and there are view-multiple presets.