Skip to content

Commit

Permalink
add png support
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Dewald committed Mar 3, 2021
1 parent 9ade0cb commit c84f014
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pathtraverser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RecursivePathTraverser::~RecursivePathTraverser() {}

QStringList RecursivePathTraverser::getImages() const
{
QDirIterator it(QString(path.c_str()), QStringList() << "*.jpg" << "*.JPG" << "*.jpeg" << "*.JPEG", QDir::Files, QDirIterator::Subdirectories);
QDirIterator it(QString(path.c_str()), QStringList() << "*.jpg" << "*.JPG" << "*.jpeg" << "*.JPEG" << "*.PNG" << "*.png", QDir::Files, QDirIterator::Subdirectories);
QStringList files;
while (it.hasNext())
{
Expand All @@ -46,7 +46,7 @@ DefaultPathTraverser::~DefaultPathTraverser() {}

QStringList DefaultPathTraverser::getImages() const
{
return directory.entryList(QStringList() << "*.jpg" << "*.JPG" << "*.jpeg" << "*.JPEG", QDir::Files);
return directory.entryList(QStringList() << "*.jpg" << "*.JPG" << "*.jpeg" << "*.JPEG" << "*.PNG" << "*.png", QDir::Files);
}

const std::string DefaultPathTraverser::getImagePath(const std::string image) const
Expand Down

0 comments on commit c84f014

Please sign in to comment.