Skip to content

Commit

Permalink
Add .jfif to supported file extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
sylikc committed Nov 23, 2023
2 parents 56b8b82 + c9b5082 commit 57ac9bc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/JPEGView.Setup/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@
<!-- csFileEndingsInternal -->
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\Applications\JPEGView.exe\SupportedTypes" Name=".jpg" Value="" Type="string" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\Applications\JPEGView.exe\SupportedTypes" Name=".jpeg" Value="" Type="string" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\Applications\JPEGView.exe\SupportedTypes" Name=".jfif" Value="" Type="string" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\Applications\JPEGView.exe\SupportedTypes" Name=".bmp" Value="" Type="string" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\Applications\JPEGView.exe\SupportedTypes" Name=".png" Value="" Type="string" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\Applications\JPEGView.exe\SupportedTypes" Name=".tif" Value="" Type="string" />
Expand Down
2 changes: 1 addition & 1 deletion src/JPEGView/FileExtensionsDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ LRESULT CFileExtensionsDlg::OnListViewKeyDown(WPARAM /*wParam*/, LPNMHDR lpnmhdr
}

void CFileExtensionsDlg::FillFileExtensionsList() {
InsertExtension(_T("*.jpg;*.jpeg"), FormatHint(CNLS::GetString(_T("%s images")), _T("JPEG")));
InsertExtension(_T("*.jpg;*.jpeg;*.jfif"), FormatHint(CNLS::GetString(_T("%s images")), _T("JPEG")));
InsertExtension(_T("*.png"), FormatHint(CNLS::GetString(_T("%s images")), _T("PNG")));
InsertExtension(_T("*.tif;*.tiff"), FormatHint(CNLS::GetString(_T("%s images")), _T("TIFF")));
InsertExtension(_T("*.bmp"), FormatHint(CNLS::GetString(_T("%s images")), _T("Windows bitmap")));
Expand Down
4 changes: 2 additions & 2 deletions src/JPEGView/FileList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ void CFileDesc::SetModificationDate(const FILETIME& lastModDate) {

// image file types supported internally (there are additional endings for RAW and WIC - these come from INI file)
// NOTE: when adding more supported filetypes, update installer to add another extension for "SupportedTypes"
static const int cnNumEndingsInternal = 16;
static const TCHAR* csFileEndingsInternal[cnNumEndingsInternal] = {_T("jpg"), _T("jpeg"), _T("bmp"), _T("png"),
static const int cnNumEndingsInternal = 17;
static const TCHAR* csFileEndingsInternal[cnNumEndingsInternal] = {_T("jpg"), _T("jpeg"), _T("jfif"), _T("bmp"), _T("png"),
_T("tif"), _T("tiff"), _T("gif"), _T("webp"), _T("jxl"), _T("avif"), _T("heif"), _T("heic"), _T("tga"), _T("qoi"), _T("psd"), _T("psb") };
// supported camera RAW formats
static const TCHAR* csFileEndingsRAW = _T("*.pef;*.dng;*.crw;*.nef;*.cr2;*.mrw;*.rw2;*.orf;*.x3f;*.arw;*.kdc;*.nrw;*.dcr;*.sr2;*.raf");
Expand Down
2 changes: 1 addition & 1 deletion src/JPEGView/Helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ EImageFormat GetImageFormat(LPCTSTR sFileName) {
LPCTSTR sEnding = _tcsrchr(sFileName, _T('.'));
if (sEnding != NULL) {
sEnding += 1;
if (_tcsicmp(sEnding, _T("JPG")) == 0 || _tcsicmp(sEnding, _T("JPEG")) == 0) {
if (_tcsicmp(sEnding, _T("JPG")) == 0 || _tcsicmp(sEnding, _T("JPEG")) == 0 || _tcsicmp(sEnding, _T("JFIF")) == 0) {
return IF_JPEG;
} else if (_tcsicmp(sEnding, _T("BMP")) == 0) {
return IF_WindowsBMP;
Expand Down

0 comments on commit 57ac9bc

Please sign in to comment.