reportAsBad
void reportAsBad ( )
Description
Handles an incorrectly resolved image. Some types of decoders won't have anything here
Parameters
This method takes no parameters
Return Value
This method returns void.
Change Log
Version | Description |
---|---|
5.5.29a | Available in all editions. |
Examples
Convert and image to text
import com.screenscraper.util.images.*;
// Assuming an ImageDecoder was created in a different location and saved in "IMAGE_DECODER"
ImageDecoder decoder = session.getVariable("IMAGE_DECODER");
DecodedImage result = decoder.decodeFile("someFile.jpg");
if(result.wasError())
{
session.logWarn("Error converting image to text: " + result.getError());
}
else
{
session.log("Decoded Text: " + result.getResult());
}
// If the result was bad
result.reportAsBad();
// Assuming an ImageDecoder was created in a different location and saved in "IMAGE_DECODER"
ImageDecoder decoder = session.getVariable("IMAGE_DECODER");
DecodedImage result = decoder.decodeFile("someFile.jpg");
if(result.wasError())
{
session.logWarn("Error converting image to text: " + result.getError());
}
else
{
session.log("Decoded Text: " + result.getResult());
}
// If the result was bad
result.reportAsBad();
mikes on 11/21/2011 at 4:25 pm
- Printer-friendly version
- Login or register to post comments