Aurigma Image Uploader 5.0 Dual
ImageUploader.QualityMeterFormats Property
See Also Supported in: ActiveX Java

A value which defines print formats for the quality meter.

# Syntax

##### Initialize

JavaScript | Copy Code
--- | ---
    <script type="text/javascript" src="iuembed.js"></script>
    <script type="text/javascript">
    var iu = new ImageUploaderWriter("ImageUploaderID", 610, 500);
    //...other params...
    iu.addParam("QualityMeterFormats", "");
    //...other params...
    iu.writeHtml();
    </script>

##### Get/Set Value in Runtime

JavaScript | Copy Code
--- | ---
    getImageUploader("ImageUploaderID").setQualityMeterFormats(value);
    value = getImageUploader("ImageUploaderID").getQualityMeterFormats();

##### Property Value

A string value that specifies a set of the print formats used in the quality meter. Format of this string is the following:

`Format 1 name,format 1 width (pixels),format 1 height (pixels),acceptable format 1 ratio;Format 2 name,format 2 width (pixels),format 2 height (pixels),acceptable format 2 ratio;...`

In other words:

- Each format is defined with 4 mandatory parameters: name, width, height, and acceptable ratio.
- Parameters are separated by semicolon.
- Formats are separated by semicolon.

Example of quality meter string can be found in the Remarks section.

If it is equal to the empty string, no quality meter is displayed.

Default value is "".

# Remarks

As mentioned above, each print format is described with four parameters:

Format name
  Name of the print format which will be displayed as a tooltip when a mouse is hovering over an appropriate quality meter element.
Format width
  Minimum width (in pixels) which the photo should have to be interpreted as high quality for this print format (i.e. colored by the QualityMeterHighQualityColor value).
Format height
  Minimum height (in pixels) which the photo should have to be interpreted as high quality for this print format (i.e. colored by the QualityMeterHighQualityColor value).
Acceptable ratio (further, AR)
  Maximum acceptable ratio of format width (or height) and actual photo width (or height). If format `width/photo width` will be larger than AR, the photo will be interpreted as unacceptable for this print format.

Note
To be interpreted as high quality, the photo should have both width and height equal or larger than specified ones. Say, if width will conform to the limitation, and height - not, the photo will not be interpreted as high quality.

For example, imagine we specify the following quality meter string:

JavaScript | Copy Code
--- | ---
    iu.addParam("QualityMeterFormats", "4x6 inches,1800,1200,1.2;6x8 inches,2400,1800,1.3;");

It means that you specify two formats: 4x6 inches (1200x1800 pixels if to print with resolution equal to 300 DPI) and 6x8 inches (1800x2400 pixels for 300 DPI). This way the quality meter will have two elements. The table below demonstrates the quality meter values for images of different size. Let's assume that the default values for the quality meter colors are used (allowed formats are green, acceptable - yellow, non-recommended ones are gray).

Image dimensions | Quality meter colors | Comment
--- | --- | ---
2000x3000 | 4x6 inches - Green 6x8 inches - Green | Image dimensions exceed both format restrictions, so we can freely print it in both formats.
1500x2000 | 4x6 inches - Green 6x8 inches - Yellow | The dimensions are larger than 4x6 inches, but smaller than 6x8 inches. Now we should estimate if it can be printed with the acceptable quality in 6x8 format. To do it, calculate the ratio between the format dimensions and the actual image dimensions (let's take a width for brevity): `1800/1500 = 1.2` Now we compare this value with the acceptable ratio (AR) specified as the fourth parameter. If this value is larger than AR, an image cannot be printed with this format, if otherwise - it is acceptable. The AR specified for 6x8 inches is 1.3, thus it is acceptable and we mark a color meter with yellow.
1200x1800 | 4x6 inches - Green 6x8 inches - Gray | The dimensions conform 4x6 inches, but are smaller than 6x8 inches. This time if we calculate the ratio between the format dimensions and the actual image dimensions, we will get: `1800/1200 = 1.5` It is larger than the AR (which is equal to 1.3) and that's why if we print this image in the 6x8 inches format, we will get quite poor quality. So we mark this color meter item to gray (i.e. as "not recommended").
1024x1536 | 4x6 inches - Yellow 6x8 inches - Gray | The dimensions of this image are smaller than both formats. It is obviously too small for the 6x8 inches format, but let's check it for the 4x6 format: `1200/1024 =1.171875` The AR for the 4x6 inches format is 1.2, i.e. this image acceptable for it, and the appropriate quality meter element is yellow.
96x96 | 4x6 inches - Gray 6x8 inches - Gray | It is obvious that this image is too small to be printed even on a matchbox, so both elements of the quality meter are gray.

# See Also

##### Examples

Adjusting Quality Meter

##### Reference

QualityMeterAcceptableQualityColor Property
QualityMeterBackgroundColor Property
QualityMeterBorderColor Property
QualityMeterHeight Property
QualityMeterHighQualityColor Property
QualityMeterLowQualityColor Property