Comments (6)
Hi @ChristopheBelpaire, thanks for reporting this issue. I'll try to fix this issue sometime this week!
from stb_image.
Ok, the problem comes from the way I'm loading the images StbImage.read_file(path, channels: 3)
Some of my images seems to have 4 channels, the crash seems to be caused by the fact the load is forced to 3 channel for a 4 channel image.
from stb_image.
$ file /Users/cocoa/Downloads/archive/PetImages/Cat/10404.jpg
/Users/cocoa/Downloads/archive/PetImages/Cat/10404.jpg: Adobe Photoshop Image, 432 x 363, RGB, 3x 8-bit channels
I found one in the dataset that can cause this issue, but it's definitely not a JPEG image and seems to have wrong metadata perhaps. I'll look into this further
from stb_image.
Awesome, thanks!
I removed the "bad" images with :
|> Stream.filter(fn
{:ok, {%StbImage{shape: {_, _, 3}}, _}} -> true
_ -> false end)
To filter the channel, everything can be loaded with this filter.
from stb_image.
Hi @ChristopheBelpaire, v0.6.6 is out and should fix this issue!
from stb_image.
Awesome!
I tried my scenario again and it seems to load all the images.
Thanks for the fix!
from stb_image.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stb_image.