blob: a09272a2a93f522d71d22e50d30bd550582a5a1b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
/*
* $Id$
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
*/
// Author: Eric SCHAEFFER
// Description: represent an image object
package org.apache.fop.image;
import java.io.InputStream;
import java.awt.color.ColorSpace;
import java.awt.color.ICC_Profile;
import org.apache.fop.pdf.PDFColor;
import org.apache.fop.fo.FOUserAgent;
public interface FopImage {
public static final int DIMENSIONS = 1;
public static final int ORIGINAL_DATA = 2;
public static final int BITMAP = 4;
public String getMimeType();
/**
* Load particular inforamtion for this image
* This must be called before attempting to get
* the information.
* @return boolean true if the information could be loaded
*/
public boolean load(int type, FOUserAgent ua);
// Ressource location
public String getURL();
// image size
public int getWidth();
public int getHeight();
public ColorSpace getColorSpace();
public ICC_Profile getICCProfile();
// bits per pixel
public int getBitsPerPixel();
// For transparent images
public boolean isTransparent();
public PDFColor getTransparentColor();
public boolean hasSoftMask();
public byte[] getSoftMask();
// get the image bytes, and bytes properties
// get uncompressed image bytes
public byte[] getBitmaps();
// width * (bitsPerPixel / 8) * height, no ?
public int getBitmapsSize();
// get compressed image bytes
// I don't know if we really need it, nor if it
// should be changed...
public byte[] getRessourceBytes();
public int getRessourceBytesSize();
public static class ImageInfo {
public InputStream stream;
public int width;
public int height;
public Object data;
public String mimeType;
public String str;
}
}
|