Difference between revisions of "Export Resolution Draft2"

From Apache OpenOffice Wiki
Jump to: navigation, search
(First Tab; Common Settings)
(Second Tab; Inividual Settings)
Line 165: Line 165:
 
''There is already code for setting the color depth on a raster graphic, you must customize your toolbar in Draw to use it. I do not know whether a grayscaled jpeg needs an additional item.''
 
''There is already code for setting the color depth on a raster graphic, you must customize your toolbar in Draw to use it. I do not know whether a grayscaled jpeg needs an additional item.''
  
==== Second Tab; Inividual Settings ====
+
==== Second Tab; Specific Settings ====
 
The second tab contains graphic settings, which are specific to the format.
 
The second tab contains graphic settings, which are specific to the format.
 
''I have not enough knowledge about graphic formats to specify them in detail. At least the current settings should be possible, but for example tiff-format allows some settings, which are up to now not implemented.''
 
''I have not enough knowledge about graphic formats to specify them in detail. At least the current settings should be possible, but for example tiff-format allows some settings, which are up to now not implemented.''

Revision as of 16:57, 17 March 2008

Setting Pixel Resolution when Exporting Graphics

Specification Status
Author Regina Henschel
Last Change
Status (Help) Preliminary

Abstract

This specification describes an User Interface to determine the amount of pixels which are used, when exporting a graphic from to a raster format like BMP oder PNG. The corresponding enhancement request has 45 votes and several duplicates.

References

Reference Document Check Location (URL)
Prerequisites [passed/failed] n/a
Product Requirement, RFE, Issue ID (required) [available] [#4499]
Test case specification (required) [available/not available] <PLEASE ENTER LOCATION HERE>
IDL Specification [available/not available] <PLEASE ENTER LOCATION HERE>
Software Specification Rules n/a n/a
Other, e.g. references to related specs, Product Concept Document <PLEASE ENTER LOCATION HERE>

Contacts

Role Name E-Mail Address
Developer <First Name, Last Name> <User@openoffice.org>
Quality Assurance <First Name, Last Name> <User@openoffice.org>
Documentation <First Name, Last Name> <User@openoffice.org>
User Experience <First Name, Last Name> <User@openoffice.org>

Acronyms and Abbreviations

Acronym / Abbreviation Definition
<WYSIWYG> <What You See Is What You Get>

Detailed Specification

Current Situation in OOo2.4

OpenOffice.org can export the vector format drawings to a raster format. The amount of pixels are calculated from the screen resolution of the operating system, the view scale setting in Tools > Options and the width and height of the object. For example: An object with 1.0 x 0.5 inches, with a Windows XP screen resolution of "120DPI" and an OOo view scaling of 125% gives on export to BMP a size of 151 x 76 Pixels. This is approximately the calculation 1.0 inches ⋅ 120DPI ⋅ 125% = 150 dots. During export there is a list to determine "DPI", but that does not change the amount of pixels but only sets an meta information. There exists already some code to set pixel resolution. But this can only be used with a macro. The current export dialog uses a lot of dialogs, depending on the kind of target format.

  • EMF, MET, PICT, SVM, WMF

ExportOOo2draw2emf.png ExportOOo2draw2met.png ExportOOo2draw2pict.png ExportOOo2draw2svm.png ExportOOo2draw2wmf.png

  • PBM, PPM

ExportOOo2draw2pbm.png ExportOOo2draw2ppm.png

  • BMP

ExportOOo2draw2bmp.png

  • EPS

ExportOOo2draw2eps.png

  • GIF

ExportOOo2draw2gif.png

  • JPEG

ExportOOo2draw2jpeg.png

  • PDF

ExportOOo2draw2pdf.png

  • PNG

ExportOOo2draw2png.png

  • Without any dialog are RAS, SVG, SWF, TIFF
  • Export to HTML uses a wizard.

Competitor's Solutions

Corel Draw 12

Corel Draw 12 uses one dialog for all kind of target raster formats. Elements which do not apply to the specified format are greyed out. Settings which are only necessary for a specific format are set in a following dialog. In addition to the pixel resolution the user can set the color depth. Examples:

  • Standard Bitmap Dialog

common dialog for export to a raster graphic format

  • Special Options Dialogs

ExportCorel2pngoptions.png ExportCorel2jpegoptions.png

New Behavior in OpenOffice.org

OpenOffice.org uses a unified tabbed dialog, which appears after the user has chosen the export file format. The tabs depend on the export format. All settings are persistent during one OOo session. There is no restriction to the settings but the available space in RAM and on disk. The new dialog applies to the export formats BMP, GIF, JPEG, MET, PBM, PGM PICT, PNG, PPM, RAS, TIFF.

First Tab; General Settings

Common for all raster graphics is the first tab which contains the resolution settings and the color depth. ExportNewRasterGraphicOptions.png

The values don't fit together but only show the design of the dialog.

The drop-down list for the unit of measurement offers the same items than Tool > Options > Draw > General

Millimeter
Centimeter
Meter
Kilometer
Inch
Foot
Miles
Pica
Point

Changing the unit effects the values in the line "object size". In the line after the DPI settings the text shows always the chosen unit and that value is calculated accordingly.

Setting the DPI is a combobox with the items

72 (screen, web)
75 
96 
100 (typical LCD)
125 
150 (low quality print)
300 
600 (high quality print)

The values are always in DPI (= pixel/inch). The user gets the conversion to his chosen unit in the line below. Changing DPI affects the line "export size", "size in memory" and "round file size". Entering of decimals is allowed.

The color depth is a drop-down list with items

1 Bit Threshold
1 Bit Dithered
4 Bit Grayscales
4 Bit color palette
8 Bit Grayscales
8 Bit Color Palette
24 Bit True Color

Changing the color depth effects "size in memory" and "round file size" but not "export size".

There is already code for setting the color depth on a raster graphic, you must customize your toolbar in Draw to use it. I do not know whether a grayscaled jpeg needs an additional item.

Second Tab; Specific Settings

The second tab contains graphic settings, which are specific to the format. I have not enough knowledge about graphic formats to specify them in detail. At least the current settings should be possible, but for example tiff-format allows some settings, which are up to now not implemented.

BMP

To be done

GIF
  • Transparency Checkbox
  • Interlaced Checkbox
JPEG
  • Compression number field (Compression is reflected back to the first tab to the file size) A preview would be nice.

("Grayscale" moves to first tab)

MET

To do

PBM

To do

PGM

To do

PICT

To do

PNG
  • Transparency

Export of Transparency is not implemented yet. The transparency itself is set inside of Draw with the Eyedropper tool and the area transparency. The export dialog needs a part to preserve transparency.

  • Compression Slider (Compression is reflected back to the first tab to the file size)
  • Interlaced Checkbox
PPM

To do

RAS

To do

TIFF

To do

Third Tab; Meta Data

On the third tab the user can enter meta data. This tab is only offered, if the file format allows meta data. For example in png-format there exists a meta data "DPI", which can be uses to calculate back the original size. But it can be set to an different value than that what was used for export.

? Forth Tab; Warnings ?

The forth tab contains warning texts. It is only shown, if warning exists. Possible warnings are:

  • There is not enough memory to create the graphic. Reduce DPI or color depth. This warning disables the OK button.
  • There is not enough memory to save the graphic. This warning disables the OK button.
  • The drawing contains transparency but the file format does not support it.

Additional warnings might be necessary.

Help | User Interface Element Templates | Example Spec

Migration

Old documents need no change.

Configuration

Not decided yet. Help | Configuration Table Template

File Format

Export does not effect any of OOo's file formats. Help

Help | File Format Table Template

Open Issues

  • Can the settings be saved in the user settings? Otherwise suitable settings from Tools > Options should be prefilled.
  • Additional (or only) warning symbol or color change on the other tabs, if export size is to large?
  • The proposed solution removes all settings, which affect aspect ratio. The user can change the aspect ratio easily inside Draw. There is no need to do it in an export dialog. Otherwise there must be not only one but two fields for DPI and a checkbox for "keep ratio".
  • What about such formats, which use raster graphic as part, like PDF or EPS or HTML?
  • Solve transparency for png now?
  • Additional color depths?
Personal tools