Issues with exporting oblong matrices

Issue #487 new
Robert Leach created an issue

USE CASE: WHAT DO YOU WANT TO DO?

Export an extremely oblong matrix as a PNG "as seen on screen".

STEPS TO REPRODUCE AN ISSUE (OR TRIGGER A NEW FEATURE)

  1. Open https://bitbucket.org/TreeView3Dev/treeview3/downloads/test_14000x7.csv
  2. Type command-e

CURRENT BEHAVIOR

  1. Export preview "appears" empty
  2. "As seen on screen" tile aspect is grayed out for PNG format (not for PDF)

The graying out of "As seen on screen" (I figured out) is actually by design. The matrix is so tall that adding width to it exceeds the maximum size limitation imposed by BufferedImage. If you hover over the grayed out option for a couple seconds, a tooltip shows up saying "Too big for PNG/JPG/PPM export".

Here's the export dialog:

export-preview-blank.png

Here's what the exported file looks like without zooming:

14000x7_unzoomed_export.png

The zoomed in version shows that it is actually OK:

14000x7_zoomed_export.png

And here is the as-seen-on-screen item working for PDF export:

14000x7_pdf_opts.png

EXPECTED BEHAVIOR

  1. If the 1:1 tile aspect validly results in an effective "invisible" matrix, either we should fit the matrix to a minimum dimension size (e.g. 3 pixels) or the user should be made aware in some way that the matrix is too thin to be displayed properly in the preview.

  2. The reason "As seen on screen" is not selectable should be more readily apparent.

DEVELOPERS ONLY SECTION

SUGGESTED CHANGE (Pseudocode optional)

  1. I would set a minimum preview dimension size of 3 (or 1?) pixels. If either side (width or height) returned by ExportHandler would end up less than 3 pixels, force that size to 3 (or 1?) pixels (not proportionally).

  2. I'd suggest 2 things: make the grayed out text of any form element which is grayed out due to BufferedImage size limitations be a shade of "grayed out red" and second, I would make the tooltip appear instantly upon hover, instead of the 1 or 2 second delayed appearance it makes.

FILES AFFECTED (where the changes will be implemented) - developers only

unknown

LEVEL OF EFFORT - developers only

minor

COMMENTS

Comments (1)

  1. Log in to comment