01: /*
02: * $RCSfile: PNMEncodeParam.java,v $
03: *
04: * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
05: *
06: * Use is subject to license terms.
07: *
08: * $Revision: 1.1 $
09: * $Date: 2005/02/11 04:55:32 $
10: * $State: Exp $
11: */
12: package com.sun.media.jai.codec;
13:
14: /**
15: * An instance of <code>ImageEncodeParam</code> for encoding images in
16: * the PNM format.
17: *
18: * <p> This class allows for the specification of whether to encode
19: * in the ASCII or raw variants of the PBM, PGM, and PPM formats.
20: * By default, raw encoding is used.
21: *
22: * <p><b> This class is not a committed part of the JAI API. It may
23: * be removed or changed in future releases of JAI.</b>
24: */
25: public class PNMEncodeParam implements ImageEncodeParam {
26:
27: private boolean raw = true;
28:
29: /**
30: * Constructs a PNMEncodeParam object with default values for parameters.
31: */
32: public PNMEncodeParam() {
33: }
34:
35: /**
36: * Sets the representation to be used. If the <code>raw</code>
37: * parameter is <code>true</code>, raw encoding will be used;
38: * otherwise ASCII encoding will be used.
39: *
40: * @param raw <code>true</code> if raw format is to be used.
41: */
42: public void setRaw(boolean raw) {
43: this .raw = raw;
44: }
45:
46: /**
47: * Returns the value of the <code>raw</code> parameter.
48: */
49: public boolean getRaw() {
50: return raw;
51: }
52: }
|