1
2 package org.freehep.graphicsio.swf;
3
4 import java.awt.Color;
5 import java.awt.Image;
6 import java.awt.image.ImageObserver;
7 import java.awt.image.RenderedImage;
8 import java.io.IOException;
9
10 import org.freehep.util.images.ImageUtilities;
11
12
13
14
15
16
17
18
19 public class DefineBitsLossless2 extends DefineBitsLossless {
20
21 public DefineBitsLossless2(int id, Image image, Color bkg,
22 ImageObserver observer) {
23 this(id, ImageUtilities.createRenderedImage(image, observer, bkg), bkg);
24 }
25
26 public DefineBitsLossless2(int id, RenderedImage image, Color bkg) {
27 this();
28 character = id;
29 this.image = image;
30 this.bkg = bkg;
31 }
32
33 public DefineBitsLossless2() {
34 super(36, 3);
35 }
36
37 public SWFTag read(int tagID, SWFInputStream swf, int len)
38 throws IOException {
39 DefineBitsLossless2 tag = new DefineBitsLossless2();
40 tag.read(tagID, swf, len, true);
41 return tag;
42 }
43
44 public void write(int tagID, SWFOutputStream swf) throws IOException {
45
46 write(tagID, swf, true);
47 }
48 }