Make requested changes

* Remove cast in scanline
* Improve Glib::ustring conversion
This commit is contained in:
xiota
2024-04-21 02:17:19 +00:00
parent 4d715cf281
commit 8c5fc60a7d
3 changed files with 43 additions and 16 deletions

View File

@@ -18,6 +18,8 @@
*/
#pragma once
#include <vector>
#include <type_traits>
#include <glibmm/ustring.h>
@@ -43,6 +45,8 @@ constexpr typename std::underlying_type<ENUM>::type toUnderlying(ENUM value)
return static_cast<typename std::underlying_type<ENUM>::type>(value);
}
std::vector<std::uint8_t> getFileData(const Glib::ustring &filename);
// Return lower case extension without the "." or "" if the given name contains no "."
Glib::ustring getFileExtension(const Glib::ustring& filename);
// Return true if file has .jpeg or .jpg extension (ignoring case)