SHA256
1
0
forked from pool/hugin
hugin/hugin-jpe.patch

68 lines
2.9 KiB
Diff

This patch adds support for JPEG files named "*.jpe".
--- src/Panorama/PanoramaMemento.cpp
+++ src/Panorama/PanoramaMemento.cpp
@@ -270,7 +270,7 @@
}
setImageSize(vigra::Size2D(width, height));
- if (ext != "JPG" && ext != "JPEG") {
+ if (ext != "JPG" && ext != "JPEG" && ext != "JPE") {
return false;
}
--- src/foreign/vigra_impex/jpeg.cxx
+++ src/foreign/vigra_impex/jpeg.cxx
@@ -81,9 +81,10 @@
desc.magicStrings[0][2] = '\377';
// init file extensions
- desc.fileExtensions.resize(2);
+ desc.fileExtensions.resize(3);
desc.fileExtensions[0] = "jpg";
desc.fileExtensions[1] = "jpeg";
+ desc.fileExtensions[2] = "jpe";
desc.bandNumbers.resize(2);
desc.bandNumbers[0] = 1;
--- src/hugin/LensPanel.cpp
+++ src/hugin/LensPanel.cpp
@@ -700,7 +700,8 @@
// check file extension
wxFileName file(wxString(pano.getImage(imgNr).getFilename().c_str(), *wxConvCurrent));
if (file.GetExt().CmpNoCase(wxT("jpg")) == 0 ||
- file.GetExt().CmpNoCase(wxT("jpeg")) == 0 )
+ file.GetExt().CmpNoCase(wxT("jpeg")) == 0 ||
+ file.GetExt().CmpNoCase(wxT("jpe")) == 0 )
{
double cropFactor = 0;
double focalLength = 0;
@@ -782,7 +783,8 @@
// try to read the exif data and add that to the lens ini file
wxFileName file(wxString(pano.getImage(imgNr).getFilename().c_str(), *wxConvCurrent));
if (file.GetExt().CmpNoCase(wxT("jpg")) == 0 ||
- file.GetExt().CmpNoCase(wxT("jpeg")) == 0 )
+ file.GetExt().CmpNoCase(wxT("jpeg")) == 0 ||
+ file.GetExt().CmpNoCase(wxT("jpe")) == 0 )
{
ImageInfo_t exif;
--- src/hugin/MainFrame.cpp
+++ src/hugin/MainFrame.cpp
@@ -98,6 +98,7 @@
if (file.GetExt().CmpNoCase(wxT("jpg")) == 0 ||
file.GetExt().CmpNoCase(wxT("jpeg")) == 0 ||
+ file.GetExt().CmpNoCase(wxT("jpe")) == 0 ||
file.GetExt().CmpNoCase(wxT("tif")) == 0 ||
file.GetExt().CmpNoCase(wxT("tiff")) == 0 ||
file.GetExt().CmpNoCase(wxT("png")) == 0 ||
@@ -704,7 +705,7 @@
// get the global config object
wxConfigBase* config = wxConfigBase::Get();
- wxString wildcard (_("All Image files|*.jpg;*.JPG;*.tif;*.TIF;*.tiff;*.TIFF;*.png;*.PNG;*.bmp;*.BMP;*.gif;*.GIF;*.pnm;*.PNM;*.sun;*.viff;*.hdr|JPEG files (*.jpg,*.jpeg)|*.jpg;*.JPG;*.jpeg;*.JPEG|All files (*)|*"));
+ wxString wildcard (_("All Image files|*.jpg;*.JPG;*.jpeg;*.JPEG;*.jpe;*.JPE;*.tif;*.TIF;*.tiff;*.TIFF;*.png;*.PNG;*.bmp;*.BMP;*.gif;*.GIF;*.pnm;*.PNM;*.sun;*.viff;*.hdr|JPEG files (*.jpg,*.jpeg,*.jpe)|*.jpg;*.JPG;*.jpeg;*.JPEG;*.jpe;*.JPE|All files (*)|*"));
wxString path = config->Read(wxT("actualPath"), wxT(""));
wxFileDialog dlg(this,_("Add images"),