~ubuntu-branches/ubuntu/vivid/luminance-hdr/vivid-proposed

« back to all changes in this revision

Viewing changes to src/HdrCreation/createhdr.cpp

  • Committer: Package Import Robot
  • Author(s): Andreas Metzler
  • Date: 2012-11-03 09:09:25 UTC
  • mfrom: (3.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20121103090925-6b12x4a4cpqd3u4q
Tags: 2.3.0-2
Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
192
192
    {
193
193
        FILE* respfile = fopen(QFile::encodeName(chosen_config->LoadCurveFromFilename).constData(),"r");
194
194
        // read camera response from file
195
 
        bool loadR_ok = responseLoad(respfile, Ir.data(), M);
196
 
        bool loadG_ok = responseLoad(respfile, Ig.data(), M);
197
 
        bool loadB_ok = responseLoad(respfile, Ib.data(), M);
 
195
        bool load_ok = responseLoad(respfile, Ir.data(), Ig.data(), Ib.data(), M);
198
196
        fclose(respfile);
199
197
 
200
 
        if ( !loadR_ok || !loadG_ok || !loadB_ok )
 
198
        if ( !load_ok)
201
199
        {
202
200
            responseGamma(Ir.data(), M);
203
201
            responseGamma(Ig.data(), M);
237
235
        break;
238
236
    }
239
237
 
 
238
        //save response curves if required (variable not empty)
 
239
        if (chosen_config->SaveCurveToFilename != "") {
 
240
                FILE * respfile=fopen(QFile::encodeName(chosen_config->SaveCurveToFilename).constData(), "w");
 
241
                responseSave(respfile, Ir.data(), Ig.data(), Ib.data(), M);
 
242
                fclose(respfile);
 
243
        }
 
244
 
240
245
    //3) apply model to generate hdr.
241
246
    switch ( opt_model )
242
247
    {