Skip to content

Commit

Permalink
Fix compilation error when there is no libjpeg (#8342)
Browse files Browse the repository at this point in the history
Co-authored-by: vfdev <[email protected]>
  • Loading branch information
cdzhan and vfdev-5 authored Mar 21, 2024
1 parent d868be9 commit 480eec2
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions torchvision/csrc/io/image/cpu/exif.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,6 @@ inline int fetch_jpeg_exif_orientation(j_decompress_ptr cinfo) {

return fetch_exif_orientation(exif_data_ptr, size);
}
#else // #if JPEG_FOUND
inline int fetch_jpeg_exif_orientation(j_decompress_ptr cinfo) {
return -1;
}
#endif // #if JPEG_FOUND

#if PNG_FOUND && defined(PNG_eXIf_SUPPORTED)
Expand All @@ -216,10 +212,6 @@ inline int fetch_png_exif_orientation(png_structp png_ptr, png_infop info_ptr) {
return fetch_exif_orientation(exif, num_exif);
}
}
#else // #if PNG_FOUND && defined(PNG_eXIf_SUPPORTED)
inline int fetch_png_exif_orientation(png_structp png_ptr, png_infop info_ptr) {
return -1;
}
#endif // #if PNG_FOUND && defined(PNG_eXIf_SUPPORTED)

constexpr uint16_t IMAGE_ORIENTATION_TL = 1; // normal orientation
Expand Down

0 comments on commit 480eec2

Please sign in to comment.