01: /*
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 2005 Bull S.A.
04: * Contact: jonas-team@objectweb.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2.1 of the License, or any later version.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this library; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19: * USA
20: *
21: * --------------------------------------------------------------------------
22: * $Id$
23: * --------------------------------------------------------------------------
24: */
25: package mfb.converters;
26:
27: import javax.emb.MediaConverter;
28: import javax.emb.MediaException;
29:
30: import org.objectweb.jonas.emb.mfb.converter.image.ImageConverter;
31: import org.objectweb.jonas.emb.mfb.converter.image.ImageFormatConverterSpec;
32: import org.objectweb.jonas.emb.mfb.formats.image.BmpFormat;
33:
34: /**
35: * Converter avaiable to pass the TCK : convert a JPEG to BMP
36: * <p>
37: * TODO : check the source format to be compliant with TCK (but not spec)
38: *
39: * @author Brice Ruzand
40: */
41: public class JpegToBmpConverterSpec extends ImageFormatConverterSpec {
42:
43: /**
44: * serialVersionUID
45: */
46: private static final long serialVersionUID = -3894499792502442548L;
47:
48: /**
49: * Default constructor
50: */
51: public JpegToBmpConverterSpec() {
52: super (new BmpFormat());
53: }
54:
55: /**
56: * Constructor with specified color Depth
57: * <p>
58: * Only for TCK not realy used
59: *
60: * @param colorDepth number of bytes used to encode color (not used)
61: */
62: public JpegToBmpConverterSpec(byte colorDepth) {
63: // for compatiblity only
64: super (new BmpFormat());
65: }
66:
67: /**
68: * @see org.objectweb.jonas.emb.mfb.converter.image.ImageAbstractConverterSpec#getConverter()
69: * @inheritDoc
70: */
71: public MediaConverter getConverter() throws MediaException {
72: return new ImageConverter(this , new String[] { "jpeg", "jpg" });
73: }
74:
75: }
|