Skip to content

Commit

Permalink
Use modern Boost function to get file extension
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Jan 5, 2024
1 parent 5315a7c commit 627bb2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/em2d/include/JPGImageReaderWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <IMP/em2d/em2d_config.h>
#include "IMP/em2d/opencv_interface.h"
#include "IMP/em/ImageHeader.h"
#include <boost/filesystem/convenience.hpp>
#include <boost/filesystem.hpp>

IMPEM2D_BEGIN_NAMESPACE

Expand Down Expand Up @@ -74,7 +74,7 @@ class JPGImageReaderWriter : public ImageReaderWriter {
"discards image header "
<< std::endl);
// check extension
String ext = boost::filesystem::extension(filename);
String ext = boost::filesystem::path(filename).extension().string();
IMP_LOG_VERBOSE("JPGImageReaderWriter writing to " << filename
<< std::endl);
if (ext != ".jpg" && ext != ".jpeg") {
Expand Down
2 changes: 1 addition & 1 deletion modules/em2d/include/TIFFImageReaderWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class TIFFImageReaderWriter : public ImageReaderWriter {
"discards image header "
<< std::endl);
// check extension
String ext = boost::filesystem::extension(filename);
String ext = boost::filesystem::path(filename).extension().string();
IMP_LOG_VERBOSE("TIFFImageReaderWriter writing to " << filename
<< std::endl);
if (ext != ".tiff" && ext != ".tif") {
Expand Down

0 comments on commit 627bb2d

Please sign in to comment.