blob: d7b60a62cbc236b29260a02936664974bcf33188 (
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 org.apache.fop.datatypes.ColorSpace;
import org.apache.fop.pdf.PDFColor;
import org.apache.fop.pdf.PDFFilter;
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();
// DeviceGray, DeviceRGB, or DeviceCMYK
public ColorSpace getColorSpace();
// bits per pixel
public int getBitsPerPixel();
// For transparent images
public boolean isTransparent();
public PDFColor getTransparentColor();
// 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();
// return null if no corresponding PDFFilter
public PDFFilter getPDFFilter();
public static class ImageInfo {
public InputStream stream;
public int width;
public int height;
public Object data;
public String mimeType;
public String str;
}
}
|