Package com.adobe.epubcheck.bitmap
Class BitmapChecker
- java.lang.Object
-
- org.w3c.epubcheck.core.AbstractChecker
-
- com.adobe.epubcheck.opf.PublicationResourceChecker
-
- com.adobe.epubcheck.bitmap.BitmapChecker
-
- All Implemented Interfaces:
Checker
public class BitmapChecker extends PublicationResourceChecker
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classBitmapChecker.ImageHeuristics
-
Field Summary
Fields Modifier and Type Field Description private static intHEIGHT_MAXprivate static longIMAGESIZE_MAXprivate static intWIDTH_MAX-
Fields inherited from class org.w3c.epubcheck.core.AbstractChecker
context, report
-
-
Constructor Summary
Constructors Constructor Description BitmapChecker(ValidationContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckContent()private voidcheckHeader(byte[] header)private voidcheckImageDimensions()private static java.io.FilegetImageFile(OCFContainer container, io.mola.galimatias.URL imageURL)private BitmapChecker.ImageHeuristicsgetImageSizes()Gets image dimensions for given fileprivate static java.io.FilegetTempImageFile(OCFContainer container, io.mola.galimatias.URL imageURL)-
Methods inherited from class com.adobe.epubcheck.opf.PublicationResourceChecker
check, checkPublicationAfterContent, checkPublicationBeforeContent
-
-
-
-
Field Detail
-
HEIGHT_MAX
private static final int HEIGHT_MAX
- See Also:
- Constant Field Values
-
WIDTH_MAX
private static final int WIDTH_MAX
- See Also:
- Constant Field Values
-
IMAGESIZE_MAX
private static final long IMAGESIZE_MAX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BitmapChecker
public BitmapChecker(ValidationContext context)
-
-
Method Detail
-
checkHeader
private void checkHeader(byte[] header)
-
getImageSizes
private BitmapChecker.ImageHeuristics getImageSizes() throws java.io.IOException
Gets image dimensions for given file- Returns:
- dimensions of image
- Throws:
java.io.IOException- if the file is not a known image
-
getImageFile
private static java.io.File getImageFile(OCFContainer container, io.mola.galimatias.URL imageURL) throws java.io.IOException
- Throws:
java.io.IOException
-
getTempImageFile
private static java.io.File getTempImageFile(OCFContainer container, io.mola.galimatias.URL imageURL) throws java.io.IOException
- Throws:
java.io.IOException
-
checkImageDimensions
private void checkImageDimensions()
-
checkContent
protected boolean checkContent()
- Overrides:
checkContentin classPublicationResourceChecker
-
-