Package digilib.io
Class ImageFile
java.lang.Object
digilib.io.ImageInput
digilib.io.ImageFile
- Author:
- casties
- 
Nested Class SummaryNested classes/interfaces inherited from class digilib.io.ImageInputImageInput.InputTag
- 
Field SummaryFields inherited from class digilib.io.ImageInputmimetype, pixelSize, tags, tileSize
- 
Constructor SummaryConstructorsConstructorDescriptionImageFile(File f, FsDirectory parentDir) Constructor with File.ImageFile(String fn, FsDirectory dir) Constructor with filename (without path).
- 
Method SummaryModifier and TypeMethodDescriptionvoidcheck()Checks the image and sets size and type.floatReturns the aspect ratio of the image (width/height).getFile()Returns the input as File (if available)Returns the input as ImageInputStream (if available)getName()Returns the file name (without path).getSize()booleanhasFile()Returns if the input can be returned as File.booleanReturns if the input can be returned as ImageInputStream.booleanReturns if the input has the given tag.toString()Methods inherited from class digilib.io.ImageInputgetInputStream, getTags, hasInputStream, hasMimetype, isChecked, setMimetype, setSize, setTag, setTags, setTileSize
- 
Constructor Details- 
ImageFileConstructor with File.- Parameters:
- f- the File
- parentDir- the Directory
 
- 
ImageFileConstructor with filename (without path).- Parameters:
- fn- the fn
- dir- the Directory
 
 
- 
- 
Method Details- 
checkpublic void check()Checks the image and sets size and type.
- 
getSize- Overrides:
- getSizein class- ImageInput
- Returns:
- ImageSize
 
- 
getTileSize- Overrides:
- getTileSizein class- ImageInput
- Returns:
- the tileSize
 
- 
getMimetype- Overrides:
- getMimetypein class- ImageInput
- Returns:
- String
 
- 
getAspectpublic float getAspect()Description copied from class:ImageInputReturns the aspect ratio of the image (width/height).- Overrides:
- getAspectin class- ImageInput
- Returns:
- the aspect ratio
 
- 
hasTagDescription copied from class:ImageInputReturns if the input has the given tag. Always matches if tag==null.- Overrides:
- hasTagin class- ImageInput
- Parameters:
- tag-
- Returns:
 
- 
getNameReturns the file name (without path).- Returns:
- the name
 
- 
hasImageInputStreampublic boolean hasImageInputStream()Description copied from class:ImageInputReturns if the input can be returned as ImageInputStream.- Overrides:
- hasImageInputStreamin class- ImageInput
- Returns:
- has ImageInputStream
 
- 
getImageInputStreamDescription copied from class:ImageInputReturns the input as ImageInputStream (if available)- Overrides:
- getImageInputStreamin class- ImageInput
- Returns:
- the ImageInputStream
 
- 
hasFilepublic boolean hasFile()Description copied from class:ImageInputReturns if the input can be returned as File.- Overrides:
- hasFilein class- ImageInput
- Returns:
- has File
 
- 
getFileDescription copied from class:ImageInputReturns the input as File (if available)- Overrides:
- getFilein class- ImageInput
- Returns:
- the File
 
- 
toString
 
-