App
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
appcore
src
mhr
appcore
bitmap
Depth.java
Go to the documentation of this file.
1
package
mhr.appcore.bitmap;
2
6
public
enum
Depth
{
7
INVALID_DEPTH
(0),
8
DEPTH_8_BIT
(1);
9
10
private
final
int
bytesPerChannel
;
11
16
private
Depth
(
int
bytesPerChannel) {
17
this.bytesPerChannel = bytesPerChannel;
18
}
19
24
public
int
getBytesPerChannel
() {
25
return
bytesPerChannel;
26
}
27
33
public
static
Depth
fromBytesPerChannel
(
int
bytesPerChannel) {
34
switch
(bytesPerChannel) {
35
case
1:
36
return
Depth
.
DEPTH_8_BIT
;
37
default
:
38
return
Depth
.
INVALID_DEPTH
;
39
}
40
}
41
}
Generated on Thu May 23 2013 22:10:55 for App by
1.8.3