5
5
* The ASF licenses this file to You under the Apache License, Version 2.0
6
6
* (the "License"); you may not use this file except in compliance with
7
7
* the License. You may obtain a copy of the License at
9
9
* http://www.apache.org/licenses/LICENSE-2.0
11
11
* Unless required by applicable law or agreed to in writing, software
12
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
* limitations under the License.
18
/* $Id: ImageProcessingHints.java 641214 2008-03-26 09:12:09Z jeremias $ */
18
/* $Id: ImageProcessingHints.java 924666 2010-03-18 08:26:30Z jeremias $ */
20
20
package org.apache.xmlgraphics.image.loader;
23
23
* This interface defines some standard hints to be used for image processing in this package.
24
24
* They are provided for convenience. You can define your own hints as you like.
25
* Generally, consumers should not rely on the presence of any hint!
26
27
public interface ImageProcessingHints {
29
30
Object SOURCE_RESOLUTION = "SOURCE_RESOLUTION"; //Value: Number (unit dpi)
30
31
/** Used to send a hint about the target resolution (of the final output format). */
31
32
Object TARGET_RESOLUTION = "TARGET_RESOLUTION"; //Value: Number (unit dpi)
35
* Used to pass in the {@link ImageSessionContext}. A consumer can use this to load embedded
36
* images over the same mechanism as the main image (ex. JPEG images referenced in an
40
Object IMAGE_SESSION_CONTEXT = "IMAGE_SESSION_CONTEXT"; //Value: ImageSessionContext instance
43
* Used to pass in the {@link ImageManager}. A consumer can use this to load embedded
44
* images over the same mechanism as the main image (ex. JPEG images referenced in an
48
Object IMAGE_MANAGER = "IMAGE_MANAGER"; //Value: ImageManager instance
33
50
/** Used to tell the image loader to ignore any color profile in the image. */
34
51
Object IGNORE_COLOR_PROFILE = "IGNORE_COLOR_PROFILE"; //Value: Boolean
53
/** Used to tell a bitmap producer to generate a certain type of bitmap. */
54
Object BITMAP_TYPE_INTENT = "BITMAP_TYPE_INTENT";
57
* Used with BITMAP_TYPE_INTENT to indicate that the generated bitmap should be a
60
String BITMAP_TYPE_INTENT_GRAY = "gray";
63
* Used with BITMAP_TYPE_INTENT to indicate that the generated bitmap should be a
64
* 1 bit black and white image.
66
String BITMAP_TYPE_INTENT_MONO = "mono";
69
* Used to indicate how existing transparency information (for example, an alpha channel)
70
* shall be treated. */
71
Object TRANSPARENCY_INTENT = "TRANSPARENCY_INTENT";
74
* Used with TRANSPARENCY_INTENT to indicate that any transparency information shall be
75
* preserved (the default).
77
String TRANSPARENCY_INTENT_PRESERVE = "preserve";
80
* Used with TRANSPARENCY_INTENT to indicate that any transparency information shall be
83
String TRANSPARENCY_INTENT_IGNORE = "ignore";