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

When reading an image, the process doesn't end #45

Closed
devcrocod opened this issue Feb 10, 2020 · 2 comments
Closed

When reading an image, the process doesn't end #45

devcrocod opened this issue Feb 10, 2020 · 2 comments

Comments

@devcrocod
Copy link
Contributor

Executing the following cell:

import javax.imageio.ImageIO
import java.io.File
val ioImage = ImageIO.read(File("some_image.jpg"))

launches new process IkotlinKt that doesn't end.

@altavir
Copy link
Contributor

altavir commented Feb 10, 2020

Could you try to close the file after read? I mean

val ioImage = File("some_image.jpg").use{
  ImageIO.read(it)
}

I do not know the library, but it is possible, that image should be manually released as well...

@devcrocod
Copy link
Contributor Author

File and BufferedImage don't support Closeable interface.

But this is really a problem of implementation ImageIO.

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