Feature #3483

Charts, Export, add some preferences to define the bitmap image files export dimensions in pixels

Ajouté par Sebastien Jacquot il y a presque 2 ans. Mis à jour il y a plus d'un an.

Statut:New Début:25/10/2023
Priorité:Normal Echéance:
Assigné à:- % réalisé:

0%

Catégorie:Charts Temps passé: -
Version cible:TXM 0.8.4

Description

Add some user global preferences to manage the printing or displaying dimensions/Megapixels of the bitmap files produced by the commands "Export\Chart..." and "Export view".
The UI should shows to the user what dimensions in centimeters will be optimum according to user selected width in pixels and DPI.

Solution 1

Store some user preferences "charts_export_pixels_width" and "charts_export_dpi_resolution" at ChartsEngine level.

In RCP preference page

Set these writable fields:

  • Pixels Width
    integer field, default value: based on user screen?, max value: 8K = 7680 px?
  • DPI
    list of values: 72, 96, 150, 300, 400, 600

[SLH suggestions (less technical terminology)]

  • name "Pixels Width" -> "Image Width" + tooltip "Image Width in Pixels"
  • name "DPI" -> "Display Density" + tooltip "Image Display Pixels Density in DPI"

Set these read-only fields:

  • Width in centimeters
  • Height in centimeters

[SLH suggestions]

  • name "Width" -> "Image Display Width" + tooltip "Image Display Width in centimeters"
  • name "Height" -> "Image Display Height" + tooltip "Image Display Height in centimeters"

When changing value of the "Pixels Width" field, compute width and height according to the width and the selected DPI and fill the fields "Width in centimeters" and "Height in centimeters".

[SLH suggestion]

  • name the writable/readable fields groups:
    • Input
      • Image Width
      • Display Density
    • Output
      • Image Display Width
      • Image Display Height

Solution 2

Since the export purpose is to display a chart on a screen or to print it, it may be better to permit to set the final width in centimeters according to the selected DPI resolution.

Store some user preferences "charts_export_width_in_centimeters" and "charts_export_dpi_resolution" at ChartsEngine level.

Therefore the fields may become:

  • Display or print width from DPI (writable)
  • DPI Resolution (writable)

and the field "Pixels Width" will become readable only and computed from the 2 others fields, to inform the user.
Unfortunately, it's not possible to automatically retrieve the DPI screen resolution.

French example:

Propriétés des graphiques exportés

Résolution (en DPI) : 72, 96, 150, 300, 400, 600
Largeur d’affichage ou d’impression souhaitée (en centimètres) : 13

Largeur de l’image exportée en pixels : 1 535

[SLH suggestion]

  • Input
    • Image Display Width
    • Display Density
  • Output
    • Image Display Height
    • Image Width

Notes

For command "Export view"

The current behavior is to produced a file with the same dimensions of pixels than the chart windows pixels dimensions that is displayed on the screen.
The height must be computed according to "Pixels Width" preference and the original chart windows aspect ratio.

For command "Export\Chart..."

The current behavior is to produced a file with pixels dimensions of 1024 x 576.
We can use the "Pixels Width" preference to manage the width exported file width but since we do not have a chart windows we can not compute a height based on the viewed chart.
Need to specify how to compute the height.
Using a "Pixels Height" preference doesn't seems to be the best solution.
A better solution may be to use the aspect ratio of the user screen resolution to compute the height.

[SLH]

+1 for 'Aspect Ratio' preference but the aspect ratio may change between results:
  • 16/9 for Progression
  • 4/3 or 1/1 for AFC (planes)
  • etc.

Provide several aspect ratio preferences for results groups?

Popular aspect ratios: Widescreen.org and Wikipedia.

NOTE: the behavior seems to have changed using JFC Charts Engine since we store now the chart object (maybe since 0.8.0). Therefore, if the chart has been zoomed, etc., "Export\Chart..." will export the chart as is.

Mixed preference"

If we use the same fields and preference page for the 2 commands, it may confuse the user.
Especially if we use a "Pixels Height" preference that should not be used by "Export view". The purpose of the "Pixels width" value when using this command is only to scale the entire image but not to change its aspect ratio.

Historique

#1 Mis à jour par Sebastien Jacquot il y a presque 2 ans

  • Description mis à jour (diff)

#2 Mis à jour par Sebastien Jacquot il y a presque 2 ans

  • Sujet changé de Charts, Export, add some preferences to define the bitmap image files export demensions in pixels à Charts, Export, add some preferences to define the bitmap image files export dimensions in pixels
  • Description mis à jour (diff)

#3 Mis à jour par Sebastien Jacquot il y a presque 2 ans

  • Description mis à jour (diff)

#4 Mis à jour par Serge Heiden il y a presque 2 ans

  • Description mis à jour (diff)

#5 Mis à jour par Sebastien Jacquot il y a presque 2 ans

  • Description mis à jour (diff)

#6 Mis à jour par Sebastien Jacquot il y a presque 2 ans

  • Description mis à jour (diff)

#7 Mis à jour par Serge Heiden il y a presque 2 ans

  • Description mis à jour (diff)

Formats disponibles : Atom PDF