Skip to content

Commit

Permalink
Jerry picking fix from pytorch#4439
Browse files Browse the repository at this point in the history
  • Loading branch information
datumbox committed Sep 17, 2021
1 parent 3049380 commit 4619ae4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions torchvision/csrc/io/image/cpu/encode_jpeg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ torch::Tensor encode_jpeg(const torch::Tensor& data, int64_t quality) {
#else
// For libjpeg version <= 9b, the out_size parameter in jpeg_mem_dest() is
// defined as unsigned long, where as in later version, it is defined as size_t.
// For windows backward compatibility, we define JpegSizeType as different types
// according to the libjpeg version used, in order to prevent compilcation
// errors.
#if defined(_WIN32) || !defined(JPEG_LIB_VERSION_MAJOR) || \
(JPEG_LIB_VERSION_MAJOR < 9) || \
#if !defined(JPEG_LIB_VERSION_MAJOR) || JPEG_LIB_VERSION_MAJOR < 9 || \
(JPEG_LIB_VERSION_MAJOR == 9 && JPEG_LIB_VERSION_MINOR <= 2)
using JpegSizeType = unsigned long;
#else
Expand Down

0 comments on commit 4619ae4

Please sign in to comment.