diff --git a/rtdata/languages/English (US) b/rtdata/languages/English (US) deleted file mode 100644 index 3317fdd82..000000000 --- a/rtdata/languages/English (US) +++ /dev/null @@ -1,19 +0,0 @@ -# -# This file is part of RawTherapee. -# -# Copyright (c) 2004-2010 Gabor Horvath -# -# RawTherapee is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# RawTherapee is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with RawTherapee. If not, see . -# - diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index e2523a3c9..761ba7eca 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -19,7 +19,6 @@ #include #include #include -#include #ifdef RAWZOR_SUPPORT #include #endif @@ -279,6 +278,27 @@ ImageData::~ImageData () { iptc_data_free (iptc); } +Glib::ustring safe_locale_to_utf8 (const std::string& src) +{ + Glib::ustring utf8_str; +#ifdef GLIBMM_EXCEPTIONS_ENABLED + try { + utf8_str = Glib::locale_to_utf8(src); + } + catch (const Glib::ConvertError& e) { + utf8_str = Glib::convert_with_fallback(src, "UTF8", "LATIN1","?"); + } +#else + { + std::auto_ptr error; + utf8_str = locale_to_utf8(src, error); + if (error.get()) + utf8_str = Glib::convert_with_fallback(src, "UTF8", "LATIN1","?", error); + } +#endif //GLIBMM_EXCEPTIONS_ENABLED + return utf8_str; +} + const std::vector ImageData::getIPTCData () const { std::vector iptcc; diff --git a/rtengine/imageio.cc b/rtengine/imageio.cc index b54d30d35..93e2eebed 100644 --- a/rtengine/imageio.cc +++ b/rtengine/imageio.cc @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -410,7 +409,7 @@ int ImageIO::loadTIFF (Glib::ustring fname) { int ImageIO::savePNG (Glib::ustring fname, int compression, int bps) { - FILE* file=g_fopen(safe_locale_from_utf8(fname).c_str (),"wb"); + FILE* file=g_fopen(fname.c_str (),"wb"); if (!file) return IMIO_CANNOTREADFILE; @@ -494,7 +493,7 @@ int ImageIO::saveJPEG (Glib::ustring fname, int quality) { cinfo.err = jpeg_std_error (&jerr); jpeg_create_compress (&cinfo); - FILE *file = g_fopen (safe_locale_from_utf8(fname).c_str (), "wb"); + FILE *file = g_fopen (fname.c_str (), "wb"); if (!file) return IMIO_CANNOTREADFILE; @@ -598,7 +597,7 @@ int ImageIO::saveTIFF (Glib::ustring fname, int bps, bool uncompressed) { unsigned char* linebuffer = new unsigned char[lineWidth]; // TODO the following needs to be looked into - do we really need two ways to write a Tiff file ? if (exifRoot && uncompressed) { - FILE *file = g_fopen (safe_locale_from_utf8(fname).c_str (), "wb"); + FILE *file = g_fopen (fname.c_str (), "wb"); if (!file) return IMIO_CANNOTREADFILE; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 0b0b4d68a..8805718b4 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -17,7 +17,6 @@ * along with RawTherapee. If not, see . */ #include -#include #include #include #include @@ -330,7 +329,7 @@ int ProcParams::save (Glib::ustring fname) const { keyFile.set_string_list ("IPTC", iptc[i].field, values); } - FILE *f = g_fopen (safe_locale_from_utf8(fname).c_str(), "wt"); + FILE *f = g_fopen (fname.c_str(), "wt"); if (f==NULL) return 1; diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 90c0a04bd..3adf92c7e 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -283,7 +283,7 @@ void RawImageSource::getImage (ColorTemp ctemp, int tran, Image16* image, Previe interpolate_image(image, hrp, rm, gm, bm, pp.skip, tran, fw, imwidth, imheight, sx1, sy1, tid*blk, (tid+1)*blk); else interpolate_image(image, hrp, rm, gm, bm, pp.skip, tran, fw, imwidth, imheight, sx1, sy1, tid*blk,imheight); -} +} #else interpolate_image(image, hrp, rm, gm, bm, pp.skip, tran, fw, imwidth, imheight, sx1, sy1, 0, imheight); #endif @@ -1154,8 +1154,7 @@ void RawImageSource::colorSpaceConversion (Image16* im, ColorManagementParams cm for (int j=0; j<3; j++) for (int k=0; k<3; k++) mat[i][j] += camMatrix[i][k] * work[k][j]; - -#pragma omp parallel for + for (int i=0; iheight; i++) for (int j=0; jwidth; j++) { @@ -1177,8 +1176,7 @@ void RawImageSource::colorSpaceConversion (Image16* im, ColorManagementParams cm if (hTransform) { if (cmp.gammaOnInput) { double gd = pow (2.0, defgain); - defgain = 0.0; -#pragma omp parallel for + defgain = 0.0; for (int i=0; iheight; i++) for (int j=0; jwidth; j++) { im->r[i][j] = CurveFactory::gamma (CLIP(defgain*im->r[i][j])); diff --git a/rtengine/rawimagesource.h b/rtengine/rawimagesource.h index 71979c906..e7464673c 100644 --- a/rtengine/rawimagesource.h +++ b/rtengine/rawimagesource.h @@ -98,7 +98,6 @@ class RawImageSource : public ImageSource { void updateHLRecoveryMap (std::string method, double rm, double gm, double bm); void updateHLRecoveryMap_ColorPropagation (); void HLRecovery_ColorPropagation (unsigned short* red, unsigned short* green, unsigned short* blue, int i, int sx1, int width, int skip); - void interpolate_image(Image16* image, HRecParams hrp, double rm, double gm, double bm, int skip, int tran, int fw, int imwidth, int imheight, int sx, int sy, int start, int end); public: diff --git a/rtgui/batchqueue.cc b/rtgui/batchqueue.cc index 10571944d..c2999933c 100644 --- a/rtgui/batchqueue.cc +++ b/rtgui/batchqueue.cc @@ -208,9 +208,6 @@ rtengine::ProcessingJob* BatchQueue::imageReady (rtengine::IImage16* img) { // the same output filename with different extension //processing->params.save (removeExtension(fname) + paramFileExtension); processing->params.save (fname + paramFileExtension); - else { - printf("Unable to process or save %s\n", fname.c_str()); - } if (processing->thumbnail) { processing->thumbnail->imageDeveloped (); processing->thumbnail->imageRemovedFromQueue (); diff --git a/rtgui/safegtk.cc b/rtgui/safegtk.cc index 5660ae799..acd0e7dad 100644 --- a/rtgui/safegtk.cc +++ b/rtgui/safegtk.cc @@ -117,49 +117,6 @@ void safe_build_subdir_list (Glib::RefPtr &dir, std::vector error; - utf8_str = locale_to_utf8(src, error); - if (error.get()) - utf8_str = Glib::convert_with_fallback(src, "UTF8", "LATIN1","?", error); - } -#endif //GLIBMM_EXCEPTIONS_ENABLED - return utf8_str; -} - -std::string safe_locale_from_utf8 (const Glib::ustring& utf8_str) -{ - std::string str; -#ifdef GLIBMM_EXCEPTIONS_ENABLED - try { - str = Glib::locale_from_utf8(utf8_str); - } - catch (const Glib::ConvertError& e) { - //str = Glib::convert_with_fallback(utf8_str, "LATIN1", "UTF8", "?"); - } -#else - { - std::auto_ptr error; - str = Glib::locale_from_utf8(utf8_str, error); - /*if (error.get()) - {str = Glib::convert_with_fallback(utf8_str, "LATIN1", "UTF8", "?", error);}*/ - } -#endif //GLIBMM_EXCEPTIONS_ENABLED - return str; -} - - bool safe_spawn_command_line_async (const Glib::ustring& cmd_utf8) { std::string cmd; @@ -187,3 +144,24 @@ bool safe_spawn_command_line_async (const Glib::ustring& cmd_utf8) #endif return success; } + +std::string safe_locale_from_utf8 (const Glib::ustring& utf8_str) +{ + std::string str; +#ifdef GLIBMM_EXCEPTIONS_ENABLED + try { + str = Glib::locale_from_utf8(utf8_str); + } + catch (const Glib::ConvertError& e) { + //utf8_str = Glib::convert_with_fallback(src, "UTF8", "LATIN1","?"); + } +#else + { + std::auto_ptr error; + str = Glib::locale_from_utf8(utf8_str, error); + if (error.get()) + {/*utf8_str = Glib::convert_with_fallback(src, "UTF8", "LATIN1","?", error);*/} + } +#endif //GLIBMM_EXCEPTIONS_ENABLED + return str; +}