Package com.github.mike10004.xvfbmanager
Class XwdFileToPngConverter
- java.lang.Object
-
- com.github.mike10004.xvfbmanager.XwdFileToPngConverter
-
- All Implemented Interfaces:
ScreenshotConverter<Screenshot,ImageioReadableScreenshot>
public class XwdFileToPngConverter extends Object implements ScreenshotConverter<Screenshot,ImageioReadableScreenshot>
Screenshot implementation that uses an X utility to convert a screenshot file to portable anymap format. Usesxwdtopnmto convert to PNM.
-
-
Constructor Summary
Constructors Constructor Description XwdFileToPngConverter(io.github.mike10004.subprocess.ProcessTracker processTracker, Path tempDir)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ImageioReadableScreenshotconvert(Screenshot source)protected ImageioReadableScreenshotconvert(Screenshot source, File pnmFile)ImageioReadableScreenshotconvert(Screenshot source, File pnmFile, File stderrFile)protected ImageioReadableScreenshotconvert(File pnmFile, File stderrFile, File inputFile)protected byte[]convertPnmToPng(com.google.common.io.ByteSource pnmBytes)static Iterable<String>getRequiredPrograms()
-
-
-
Constructor Detail
-
XwdFileToPngConverter
public XwdFileToPngConverter(io.github.mike10004.subprocess.ProcessTracker processTracker, Path tempDir)
-
-
Method Detail
-
convert
public ImageioReadableScreenshot convert(Screenshot source) throws IOException, XvfbException
- Specified by:
convertin interfaceScreenshotConverter<Screenshot,ImageioReadableScreenshot>- Throws:
IOExceptionXvfbException
-
convert
protected ImageioReadableScreenshot convert(Screenshot source, File pnmFile) throws IOException, XvfbException
- Throws:
IOExceptionXvfbException
-
convert
public ImageioReadableScreenshot convert(Screenshot source, File pnmFile, File stderrFile) throws IOException, XvfbException
- Throws:
IOExceptionXvfbException
-
convert
protected ImageioReadableScreenshot convert(File pnmFile, File stderrFile, File inputFile) throws IOException, XvfbException
- Throws:
IOExceptionXvfbException
-
convertPnmToPng
protected byte[] convertPnmToPng(com.google.common.io.ByteSource pnmBytes) throws IOException- Throws:
IOException
-
-