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

ArithmeticException when Image is too big #1

Open
confile opened this issue Oct 7, 2015 · 1 comment
Open

ArithmeticException when Image is too big #1

confile opened this issue Oct 7, 2015 · 1 comment

Comments

@confile
Copy link

confile commented Oct 7, 2015

I tried your lib with a 7,8MB image. the operation I did was:

int[] result = ColorThief.getColor(bufferedImage, 0, true)

Here is the error I get:

   Line | Method
->>  252 | getPixelsFast    in de.androidpit.colorthief.ColorThief
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    183 | getColorMap      in     ''
|    127 | getPalette . . . in     ''
|     75 | getColor         in     ''
|    121 | save . . . . . . in majestella.admin.AdminImageItemController$$EPQQlXSS
|    198 | doFilter         in grails.plugin.cache.web.filter.PageFragmentCachingFilter
|     63 | doFilter . . . . in grails.plugin.cache.web.filter.AbstractFilter
|     53 | doFilter         in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
|     62 | doFilter . . . . in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
|     46 | doFilterInternal in org.grails.jaxrs.web.JaxrsFilter
|   1145 | runWorker . . .  in java.util.concurrent.ThreadPoolExecutor
|    615 | run              in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run . . . . . .  in java.lang.Thread
@SvenWoltmann
Copy link
Owner

Sorry for the late response. I had an outdated e-mail address in my github account and just noticed that a few days ago when I worked on another github project.

I just tested the code with several images ranging from 10 to 66 MB and no exceptions were thrown.

If you send me the image that caused the exception, I can have a look at it.

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