Skip to content

Commit 593b6f9

Browse files
cdzhanvfdev-5
authored andcommitted
Fix compilation error when there is no libjpeg (pytorch#8342)
Co-authored-by: vfdev <[email protected]>
1 parent 6043bc2 commit 593b6f9

File tree

1 file changed

+0
-8
lines changed
  • torchvision/csrc/io/image/cpu

1 file changed

+0
-8
lines changed

torchvision/csrc/io/image/cpu/exif.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,6 @@ inline int fetch_jpeg_exif_orientation(j_decompress_ptr cinfo) {
196196

197197
return fetch_exif_orientation(exif_data_ptr, size);
198198
}
199-
#else // #if JPEG_FOUND
200-
inline int fetch_jpeg_exif_orientation(j_decompress_ptr cinfo) {
201-
return -1;
202-
}
203199
#endif // #if JPEG_FOUND
204200

205201
#if PNG_FOUND && defined(PNG_eXIf_SUPPORTED)
@@ -217,10 +213,6 @@ inline int fetch_png_exif_orientation(png_structp png_ptr, png_infop info_ptr) {
217213
}
218214
return -1;
219215
}
220-
#else // #if PNG_FOUND && defined(PNG_eXIf_SUPPORTED)
221-
inline int fetch_png_exif_orientation(png_structp png_ptr, png_infop info_ptr) {
222-
return -1;
223-
}
224216
#endif // #if PNG_FOUND && defined(PNG_eXIf_SUPPORTED)
225217

226218
constexpr uint16_t IMAGE_ORIENTATION_TL = 1; // normal orientation

0 commit comments

Comments
 (0)