Difference between revisions of "Export Resolution Draft2"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Draft specification for resolution dialog after file dialog)
 
(Open Issues)
 
(33 intermediate revisions by 4 users not shown)
Line 4: Line 4:
  
 
== Abstract ==
 
== 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.
+
This specification describes an User Interface to determine the amount of pixels which are used, when exporting a graphic from Draw or Impress to a raster format like BMP oder PNG.
 
The corresponding enhancement request has 45 votes and several duplicates.
 
The corresponding enhancement request has 45 votes and several duplicates.
 
__TOC__
 
__TOC__
Line 20: Line 20:
 
| '''Product Requirement, RFE, Issue ID''' (required)
 
| '''Product Requirement, RFE, Issue ID''' (required)
 
| [available]
 
| [available]
| [[http://www.openoffice.org/issues/show_bug.cgi?id=4499|issue #4499]]
+
| {{Bug|4499}}
 
|-
 
|-
 
| '''[[Test case specification]]''' (required)
 
| '''[[Test case specification]]''' (required)
Line 89: Line 89:
 
* PBM, PPM
 
* PBM, PPM
 
[[Image:exportOOo2draw2pbm.png]]
 
[[Image:exportOOo2draw2pbm.png]]
[[Image:exportOOo2draw2pbm.png]]
+
[[Image:exportOOo2draw2ppm.png]]
 
* BMP
 
* BMP
 
[[Image:exportOOo2draw2bmp.png]]
 
[[Image:exportOOo2draw2bmp.png]]
Line 104: Line 104:
 
* Without any dialog are RAS, SVG, SWF, TIFF
 
* Without any dialog are RAS, SVG, SWF, TIFF
 
* Export to HTML uses a wizard.
 
* Export to HTML uses a wizard.
 +
 
=== Competitor's Solutions ===
 
=== Competitor's Solutions ===
 
==== Corel Draw 12 ====
 
==== Corel Draw 12 ====
Line 113: Line 114:
 
[[Image:ExportCorel2jpegoptions.png]]
 
[[Image:ExportCorel2jpegoptions.png]]
  
=== New Behavior in OpenOffice.org ===
+
=== New Behavior in OpenOffice.org 3.4 ===
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.
+
OpenOffice.org uses a unified dialog, which appears after the user has chosen the export file format. The lower section of the dialog depends 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.
 
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; Common Settings ====
+
The new dialog applies to all export formats but HTML, XHTML, PDF, SWF and PWP.
Common for all raster graphics is the first tab which contains the resolution settings and the color depth.
+
 
 
[[Image:ExportNewRasterGraphicOptions.png]]
 
[[Image:ExportNewRasterGraphicOptions.png]]
The color depth list offers:
 
* 1 Bit Threshold
 
* 1 Bit Dithered
 
* 4 Bit Grayscales
 
* 4 Bit color palette
 
* 8 Bit Grayscales
 
* 8 Bit Color Palette
 
* 24 Bit True Color
 
''There is already code for setting the color depth on a raster graphic, you must customize your toolbar in Draw to use it.''
 
==== Second Tab; Inividual 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 ====
+
''The values don't fit together but only show the design of the dialog.''
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.
+
The upper part is common to all formats. If a setting or value makes no sense for the chosen format, then it is disabled or hidden.
==== ? Forth Tab; Warnings ? ====
+
 
The forth tab contains warning texts. It is only shown, if warning exists. Possible warnings are:
+
The drop-down list for the unit of measurement offers the items
* 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.
+
inches
* The drawing contains transparency but the file format does not support it.
+
cm
''Additional warnings might be necessary.''
+
mm
[[Specification_Template_Help#Detailed_Specification|Help]] | [[UI-Elements|User Interface Element Templates]] | [[Specification_Example|Example Spec]]
+
points
 +
'''pixels'''
 +
 
 +
The length values refer to the "drawing" size, not to the "real" size. Example: The user sets "Meter" as unit of measurement for Draw in Tools > Options > General and sets the "drawing scale" to "1:10" there. If a dimension line shows 0,65m or a square has size 0,65 x 0,65 in the status bar, then the drawing size is 6,5 cm. And this size of 6,5cm will be used in the export dialog as "original size".
 +
 
 +
"Pixels" is the decisive value and can only be selected if exporting into a pixel format. The other values are calculated from the pixels width and height according to the actual setting in "Resolution". The pixel width and height is rounded up to an integer after each changing.
 +
 
 +
The user can enter decimals for all length values. Decimals are kept with the entered or calculated precision, but only shown with maximal 3 decimal places.
 +
 
 +
The drop-down list for the pixel resolution unit has the items
 +
 
 +
pixels/cm
 +
pixels/inch
 +
pixels/meter
 +
 
 +
The resolution value field contains positive integers. If the resolution value is changed, the amount of pixels is recalculated with 'new resolution value' / 'old resolution value' * 'old pixel value'. The length values of width and height are recalculated afterwards.
 +
 
 +
The value of pixel/inch is written to the meta data of the graphic, if the format allows such setting.
 +
 
 +
 
 +
The text in the part memory changes accordingly to the chosen object size, resolution and color depth. Both values are not guaranteed to be exact.
 +
''What about colour converting (especially with lower bit depths). E.g. dithering when saving to GIF or similar paletted''
 +
 
 +
The lower part contains settings, which are specific to the format.
 +
''The current settings should be possible, but I suggest some additions.''
 +
 
 +
==== BMP ====
 +
[[Image:ExportToBMPSpecialSettings.png]]
 +
 
 +
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 the pixel dimensions.
 +
 
 +
''What about 32bit RGBA / CMYK. These are not all available to all file types, e.g. GIF can only work with maximum 8 bit, JPG does not have paletted colors''
 +
 
 +
All color depths are available but '24 Bit Grayscales'.
 +
''Why is 24 Bit Grayscales not implemented for BMP export?''
 +
 
 +
RLE compression reflects back to memory size texts.
 +
 
 +
==== EMF ====
 +
No special settings needed.
 +
 
 +
''Hide color depth and pixel dimension? What to do if the selection or page which is to be exported contains bitmaps? Add a maximum DPI to down-sample embedded BMP, any DPI below that should be left as original.''
 +
 
 +
==== EPS ====
 +
[[Image:ExportToEPSSpecialSettings.png]]
 +
 
 +
Compression and preview settings reflect back to memory size texts.
 +
 
 +
''What further settings are used for the preview image? Are the user allowed to change them?''
 +
 
 +
==== GIF ====
 +
[[Image:ExportToGIFSpecialSettings.png]]
 +
 
 +
Color depth list shows the currently used setting, other values are disabled.
 +
 
 +
''It should be possible to set the color depth. Selecting palette for use, e.g. adaptive, web safe. <ref>see [http://en.wikipedia.org/wiki/Graphics_Interchange_Format "Graphics Interchange Format" in Wikipedia]</ref>''
 +
 
 +
==== JPEG ====
 +
[[Image:ExportToJPGSpecialSettings.png]]
 +
 
 +
The compression reflects back to the memory size texts.
 +
 
 +
The color depth list shows the values '24 Bit Color' and '8 Bit Grayscales', which substitute the current radio buttons. Other values are hidden.
 +
 
 +
''If and when implemented, color model (Grey / RGB / CMYK) to be set as well as color profile (ICC) embedding <ref>see [http://en.wikipedia.org/wiki/JPEG "JPEG" in Wikipedia]</ref>''
 +
 
 +
==== MET ====
 +
No special settings needed.
 +
 
 +
The color depth list shows the currently used setting, other values are disabled.
 +
 
 +
==== PBM ====
 +
[[Image:ExportToPBGPMSpecialSettings.png]]
 +
 
 +
The file format reflects back to the memory size texts.
 +
 
 +
The color depth list shows '1 Bit Treshold', other values are disabled.
 +
''That is the color depth used in PBM format.''
 +
 
 +
==== PGM ====
 +
[[Image:ExportToPBGPMSpecialSettings.png]]
 +
 
 +
''PBM need to be exchanged wtih PGM.''
 +
 
 +
The file format reflects back to the memory size texts.
 +
 
 +
The color depth list shows '8 Bit Grayscaled', other values are disabled.
 +
''That is the color depth used in PGM format.''
 +
 
 +
==== PICT ====
 +
No special settings needed.
 +
 
 +
Color depth list shows the currently used setting, other values are disabled.
 +
''PICT allows many settings, but currently the user cannot select any of them.''
 +
 
 +
==== PNG ====
 +
[[Image:ExportToPNGSpecialSettings.png]]
 +
 
 +
The compression reflects back to the memory size texts.
 +
 
 +
The color depth shows the currently used setting.
 +
''The user should be allowed to set the color depth. It is already possible for embedded png-pictures. So why not implement it for export? The code is already there.''
 +
 
 +
''Similar to GIF this could also have an index transparency. But PNG also allows 32bit colour depth which uses RGBA to accomplish opacity. <ref>see [http://en.wikipedia.org/wiki/Portable_Network_Graphics "Portable Network Graphics" in Wikipedia]</ref>''
 +
 
 +
==== PPM ====
 +
[[Image:ExportToPBGPMSpecialSettings.png]]
 +
 
 +
''Replace PBM with PPM.''
 +
 
 +
The file type reflects back to the memory size texts.
 +
 
 +
The color depth shows the currently used setting.
 +
 
 +
==== RAS ====
 +
Currently no export dialog exists.
 +
 
 +
''The format itself allows many settings. Perhaps it should be handled like BMP.''
 +
 
 +
==== SVG ====
 +
Currently no export dialog exists.
 +
 
 +
''What to do if the selection or page which is to be exported contains bitmaps?''
 +
 
 +
==== SVM ====
 +
No special settings needed.
 +
 
 +
''Hide color depth and pixel dimension?''
 +
 
 +
==== TIFF ====
 +
Currently no export dialog exists.
 +
 
 +
''The format itself allows many settings. Here are some additional implementations desirable.''
 +
 
 +
''E.g. compression method could be Uncompressed, JPEG, PackBits, LZW, as well as several 1 bit length compressors. Also allows for color model & profile embedding. <ref>see [http://en.wikipedia.org/wiki/Tagged_Image_File_Format "Tagged Image File Format" in Wikipedia]</ref>''
 +
 
 +
==== WMF ====
 +
No special settings needed.
 +
 
 +
''Hide color depth and pixel dimension? What to do if the selection or page which is to be exported contains bitmaps?''
 +
 
 +
==== XPM ====
 +
Currently no export dialog exists.
 +
 
 +
''I don't know this format. Are there now settings needed?''
 +
 
 +
 
 +
[[Specification_Template_Help#Detailed_Specification|Help]] | [[UI-Elements|User Interface Element Templates]] | [[Specification_Example|Example Spec]]
  
 
== Migration ==
 
== Migration ==
Line 182: Line 302:
 
[[Specification_Template_Help#File_Format|Help]]
 
[[Specification_Template_Help#File_Format|Help]]
  
[[Specification_Template_Help#File Format|Help]] | [[File Format Table|File Format Table Template]]
+
[[Specification_Template_Help#File Format|Help]] | [[File Format Table|File Format Table Template]]
  
 
== Open Issues ==
 
== Open Issues ==
* Can the settings be saved in the user settings? Otherwise suitable settings from Tools > Options should be prefilled.
+
* Can the settings be saved in the user settings? Should there be settings in Tools > Options which are use to prefill the dialog?
* Additional (or only) warning symbol or color change on the other tabs, if export size is to large?
+
* The memory size might be very large. What to do if the available RAM is not enough? What to do if the memory size exceeds the setting in Tools > Options?
* 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 to do if the disk space are not enough?
* What about such formats, which use raster graphic as part, like PDF or EPS or HTML?
+
* original size button needed ?
* Solve transparency for png now?
+
* should aspect ratio be changeable ?
* Additional color depths?
+
* dpi resolution needed if exporting into a vector format ? (this would apply to used bitmap fillings then)
 +
* preview bitmap...
 +
 
 +
=References=
 +
<references />
 +
 
  
 
[[Category:Specification]]
 
[[Category:Specification]]

Latest revision as of 13:28, 20 September 2010

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 Draw or Impress 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] Issue 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 3.4

OpenOffice.org uses a unified dialog, which appears after the user has chosen the export file format. The lower section of the dialog depends 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 all export formats but HTML, XHTML, PDF, SWF and PWP.

ExportNewRasterGraphicOptions.png

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

The upper part is common to all formats. If a setting or value makes no sense for the chosen format, then it is disabled or hidden.

The drop-down list for the unit of measurement offers the items

inches
cm
mm
points
pixels

The length values refer to the "drawing" size, not to the "real" size. Example: The user sets "Meter" as unit of measurement for Draw in Tools > Options > General and sets the "drawing scale" to "1:10" there. If a dimension line shows 0,65m or a square has size 0,65 x 0,65 in the status bar, then the drawing size is 6,5 cm. And this size of 6,5cm will be used in the export dialog as "original size".

"Pixels" is the decisive value and can only be selected if exporting into a pixel format. The other values are calculated from the pixels width and height according to the actual setting in "Resolution". The pixel width and height is rounded up to an integer after each changing.

The user can enter decimals for all length values. Decimals are kept with the entered or calculated precision, but only shown with maximal 3 decimal places.

The drop-down list for the pixel resolution unit has the items

pixels/cm
pixels/inch
pixels/meter

The resolution value field contains positive integers. If the resolution value is changed, the amount of pixels is recalculated with 'new resolution value' / 'old resolution value' * 'old pixel value'. The length values of width and height are recalculated afterwards.

The value of pixel/inch is written to the meta data of the graphic, if the format allows such setting.


The text in the part memory changes accordingly to the chosen object size, resolution and color depth. Both values are not guaranteed to be exact. What about colour converting (especially with lower bit depths). E.g. dithering when saving to GIF or similar paletted

The lower part contains settings, which are specific to the format. The current settings should be possible, but I suggest some additions.

BMP

ExportToBMPSpecialSettings.png

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 the pixel dimensions.

What about 32bit RGBA / CMYK. These are not all available to all file types, e.g. GIF can only work with maximum 8 bit, JPG does not have paletted colors

All color depths are available but '24 Bit Grayscales'. Why is 24 Bit Grayscales not implemented for BMP export?

RLE compression reflects back to memory size texts.

EMF

No special settings needed.

Hide color depth and pixel dimension? What to do if the selection or page which is to be exported contains bitmaps? Add a maximum DPI to down-sample embedded BMP, any DPI below that should be left as original.

EPS

ExportToEPSSpecialSettings.png

Compression and preview settings reflect back to memory size texts.

What further settings are used for the preview image? Are the user allowed to change them?

GIF

ExportToGIFSpecialSettings.png

Color depth list shows the currently used setting, other values are disabled.

It should be possible to set the color depth. Selecting palette for use, e.g. adaptive, web safe. [1]

JPEG

ExportToJPGSpecialSettings.png

The compression reflects back to the memory size texts.

The color depth list shows the values '24 Bit Color' and '8 Bit Grayscales', which substitute the current radio buttons. Other values are hidden.

If and when implemented, color model (Grey / RGB / CMYK) to be set as well as color profile (ICC) embedding [2]

MET

No special settings needed.

The color depth list shows the currently used setting, other values are disabled.

PBM

ExportToPBGPMSpecialSettings.png

The file format reflects back to the memory size texts.

The color depth list shows '1 Bit Treshold', other values are disabled. That is the color depth used in PBM format.

PGM

ExportToPBGPMSpecialSettings.png

PBM need to be exchanged wtih PGM.

The file format reflects back to the memory size texts.

The color depth list shows '8 Bit Grayscaled', other values are disabled. That is the color depth used in PGM format.

PICT

No special settings needed.

Color depth list shows the currently used setting, other values are disabled. PICT allows many settings, but currently the user cannot select any of them.

PNG

ExportToPNGSpecialSettings.png

The compression reflects back to the memory size texts.

The color depth shows the currently used setting. The user should be allowed to set the color depth. It is already possible for embedded png-pictures. So why not implement it for export? The code is already there.

Similar to GIF this could also have an index transparency. But PNG also allows 32bit colour depth which uses RGBA to accomplish opacity. [3]

PPM

ExportToPBGPMSpecialSettings.png

Replace PBM with PPM.

The file type reflects back to the memory size texts.

The color depth shows the currently used setting.

RAS

Currently no export dialog exists.

The format itself allows many settings. Perhaps it should be handled like BMP.

SVG

Currently no export dialog exists.

What to do if the selection or page which is to be exported contains bitmaps?

SVM

No special settings needed.

Hide color depth and pixel dimension?

TIFF

Currently no export dialog exists.

The format itself allows many settings. Here are some additional implementations desirable.

E.g. compression method could be Uncompressed, JPEG, PackBits, LZW, as well as several 1 bit length compressors. Also allows for color model & profile embedding. [4]

WMF

No special settings needed.

Hide color depth and pixel dimension? What to do if the selection or page which is to be exported contains bitmaps?

XPM

Currently no export dialog exists.

I don't know this format. Are there now settings needed?


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? Should there be settings in Tools > Options which are use to prefill the dialog?
  • The memory size might be very large. What to do if the available RAM is not enough? What to do if the memory size exceeds the setting in Tools > Options?
  • What to do if the disk space are not enough?
  • original size button needed ?
  • should aspect ratio be changeable ?
  • dpi resolution needed if exporting into a vector format ? (this would apply to used bitmap fillings then)
  • preview bitmap...

References

  1. see "Graphics Interchange Format" in Wikipedia
  2. see "JPEG" in Wikipedia
  3. see "Portable Network Graphics" in Wikipedia
  4. see "Tagged Image File Format" in Wikipedia
Personal tools