-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Add namespace on image C++ codebase #3312
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
Changes from all commits
60b2894
7fdc7ba
7136251
22925ff
8bad585
84616a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#pragma once | ||
|
||
#if PNG_FOUND | ||
#include <png.h> | ||
#include <setjmp.h> | ||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,12 @@ | |
#include <torch/types.h> | ||
#include "../image_read_mode.h" | ||
|
||
C10_EXPORT torch::Tensor decodeJPEG( | ||
namespace vision { | ||
namespace image { | ||
|
||
C10_EXPORT torch::Tensor decode_png( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again Github fails to figure out which file was moved to what here. |
||
const torch::Tensor& data, | ||
ImageReadMode mode = IMAGE_READ_MODE_UNCHANGED); | ||
|
||
} // namespace image | ||
} // namespace vision |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
|
||
#include <torch/types.h> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I need to start using a smart editor. I would have just There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately that's not a smart editor feature but I wish they had that functionality too. |
||
|
||
namespace vision { | ||
namespace image { | ||
|
||
C10_EXPORT torch::Tensor encode_jpeg( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Git fails to track the old file. |
||
const torch::Tensor& data, | ||
int64_t quality); | ||
|
||
} // namespace image | ||
} // namespace vision |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
|
||
#include <torch/types.h> | ||
|
||
namespace vision { | ||
namespace image { | ||
|
||
C10_EXPORT torch::Tensor encode_png( | ||
const torch::Tensor& data, | ||
int64_t compression_level); | ||
|
||
} // namespace image | ||
} // namespace vision |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
#pragma once | ||
|
||
#include <sys/stat.h> | ||
#include <torch/types.h> | ||
|
||
namespace vision { | ||
namespace image { | ||
|
||
C10_EXPORT torch::Tensor read_file(const std::string& filename); | ||
|
||
C10_EXPORT void write_file(const std::string& filename, torch::Tensor& data); | ||
|
||
} // namespace image | ||
} // namespace vision |
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here Github fails to track the right file renames and thinks I moved png to jpeg and vice versa.