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

10 concurrent goroutines for resizing causes: Corrupt JPEG data: premature end of data segment (sometimes) #42

Open
MohsenElgendy opened this issue Aug 24, 2018 · 1 comment

Comments

@MohsenElgendy
Copy link

The following gist includes the code that runs the concurrent processes that resizes images that ranges from 8mb to 14mb all in jpg format:
https://gist.github.com/MohsenElgendy/5188013d269ccf9ffacf6902805efd8f

Steps the program do:

  1. Reads all files in a directory named _ ./bulk-in_.
  2. Sends goroutines for each file found.
  3. the method that the goroutine runs is basically the example provided by lilliput with the addition of execution time calculation.

and the images that outputs the error mentioned above are glitched or gray, the exact same source code is used with gocv and it works without producing this issue.

Information:

  • Processor: 3.2 GHz Intel Core i5
  • Memory: 8 GB 1600 MHz DDR3
  • OpenCV version is: 3.4.2
  • Go version is: 1.10.3

Any ideas would be appreciated, thanks!

@brian-armstrong-discord
Copy link
Contributor

Hi @MohsenElgendy

I believe this may be fixed in the latest master, can you try again using the newest version?

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