Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging #43

Open
lbispham opened this issue Jan 20, 2020 · 1 comment
Open

Logging #43

lbispham opened this issue Jan 20, 2020 · 1 comment

Comments

@lbispham
Copy link

Can you remove this log message or at least set it to debug level instead of info? It's clogging up the log files when we process lots of images. Is there actually any action that we can take when a BufferedImage has an unrecognized type?

"com.github.kilianB.graphics.FastPixel create
INFO: No fast implementation available for 13. Fallback to slow default variant."

@KilianB
Copy link
Owner

KilianB commented Jan 20, 2020

If the same image is processed multiple times you could convert it to a known format beforehand once.

BufferedImage in = ImageIO.read(new File("2Linepdftojpeg.jpeg"));

//Convert image since input type is a weird custom format
BufferedImage newImage = new BufferedImage(in.getWidth(), in.getHeight(), BufferedImage.TYPE_INT_RGB);

Graphics2D g = newImage.createGraphics();
g.drawImage(in, 0, 0, null);
g.dispose(); 

//save to disk
...

Up until the end of the week I do not have access to my development station, therefore I can't upload and sign any binaries.
For the time being you should be able to simply mute the logger.

java.util.logging.Logger;
Logger logger = Logger.getLogger(FastPixel.class.getSimpleName());
logger(Level.OFF);

I am not really happy about the dependency of the project. I had a larger rework planned to add support for alpha channel images #38.
JavaFX should be removed or made optional due to it not being bundled in the official java release. Maybe it's time to update the codebase :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants