Fixed empty image for bug reading in Java.
|
@ -261,7 +261,7 @@ public final class CatGeneratorCLI
|
|||
catch (IOException exception)
|
||||
{
|
||||
logger.error("Error detected: {}", exception.getMessage());
|
||||
// exception.printStackTrace();
|
||||
exception.printStackTrace();
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -149,7 +149,7 @@ public class BirdGenerator
|
|||
drawImage(grapher, "hoop", generator.nextInt(10) + 1);
|
||||
drawImage(grapher, "body", generator.nextInt(9) + 1);
|
||||
drawImage(grapher, "wing", generator.nextInt(9) + 1);
|
||||
drawImage(grapher, "eye", generator.nextInt(9) + 1);
|
||||
drawImage(grapher, "eyes", generator.nextInt(9) + 1);
|
||||
drawImage(grapher, "bec", generator.nextInt(9) + 1);
|
||||
drawImage(grapher, "accessorie", generator.nextInt(20) + 1);
|
||||
|
||||
|
@ -266,7 +266,8 @@ public class BirdGenerator
|
|||
*/
|
||||
private static void drawImage(final Graphics2D grapher, final String name, final int index) throws IOException
|
||||
{
|
||||
URL url = BirdGenerator.class.getResource("/fr/devinsy/catgenerator/core/images/bird/" + name + "_" + index + ".png");
|
||||
String fileName = "/fr/devinsy/catgenerator/core/images/bird/" + name + "_" + index + ".png";
|
||||
URL url = BirdGenerator.class.getResource(fileName);
|
||||
BufferedImage part = ImageIO.read(url);
|
||||
grapher.drawImage(part, null, 0, 0);
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 187 B |