Skip to content

dump_image(): check if data has a channel axis#24

Merged
SylvainCorlay merged 1 commit intoxtensor-stack:masterfrom
ukoethe:fix-channels
Mar 16, 2018
Merged

dump_image(): check if data has a channel axis#24
SylvainCorlay merged 1 commit intoxtensor-stack:masterfrom
ukoethe:fix-channels

Conversation

@ukoethe
Copy link
Copy Markdown
Contributor

@ukoethe ukoethe commented Mar 16, 2018

The segfault in

auto in = xt::load_image("color_image.tif");
xt::dump_image("first_channel.tif", xt::view(in, xt::all(), xt::all(), 0));

was actually a genuine error (dump_image() always assumed that the data has three axes). This PR fixes this error.

@SylvainCorlay
Copy link
Copy Markdown
Member

Awesome thanks! Merging.

@SylvainCorlay SylvainCorlay merged commit 206ecfb into xtensor-stack:master Mar 16, 2018
@ukoethe ukoethe deleted the fix-channels branch March 16, 2018 21:39
@wolfv
Copy link
Copy Markdown
Member

wolfv commented Mar 16, 2018

thanks for catching this!

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

Successfully merging this pull request may close these issues.

3 participants