Skip to content

Commit 480eec2

Browse files
cdzhanvfdev-5
andauthored
Fix compilation error when there is no libjpeg (#8342)
Co-authored-by: vfdev <vfdev.5@gmail.com>
1 parent d868be9 commit 480eec2

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)
@@ -216,10 +212,6 @@ inline int fetch_png_exif_orientation(png_structp png_ptr, png_infop info_ptr) {
216212
return fetch_exif_orientation(exif, num_exif);
217213
}
218214
}
219-
#else // #if PNG_FOUND && defined(PNG_eXIf_SUPPORTED)
220-
inline int fetch_png_exif_orientation(png_structp png_ptr, png_infop info_ptr) {
221-
return -1;
222-
}
223215
#endif // #if PNG_FOUND && defined(PNG_eXIf_SUPPORTED)
224216

225217
constexpr uint16_t IMAGE_ORIENTATION_TL = 1; // normal orientation

0 commit comments

Comments
 (0)