Fixed gui (thanks to Hombre) and cleaned code a bit
This commit is contained in:
parent
81fa149570
commit
2d730572f5
@ -424,15 +424,11 @@ int RawImage::loadRaw (bool loadData, unsigned int &imageNum, bool closeFile, Pr
|
||||
//***************** Read ALL raw file info
|
||||
// set the number of the frame to extract. If the number is larger then number of existing frames - 1, dcraw will handle that correctly
|
||||
|
||||
identify ();
|
||||
fclose(ifp);
|
||||
ifp = gfopen (ifname); // Maps to either file map or direct fopen
|
||||
|
||||
shot_select = imageNum;
|
||||
shot_select = std::min(shot_select, std::max(is_raw, 1u) - 1);
|
||||
identify();
|
||||
std::cout << "israw : " << is_raw << std::endl;
|
||||
// in case dcraw didn't handle the above mentioned case...
|
||||
shot_select = std::min(shot_select, std::max(is_raw, 1u) - 1);
|
||||
imageNum = shot_select;
|
||||
|
||||
if (!is_raw) {
|
||||
|
@ -1506,9 +1506,21 @@ int RawImageSource::load (const Glib::ustring &fname, int imageNum, bool batch)
|
||||
plistener->setProgress (0.0);
|
||||
}
|
||||
|
||||
unsigned int tempImageNum = 16;
|
||||
do {
|
||||
tempImageNum --;
|
||||
unsigned int tempImageNum = 256;
|
||||
// requesting a subimage which is not available gives subimage 0. We use 256 to access a non existent frame resulting in frame 0
|
||||
ri = new RawImage(fname);
|
||||
int errCode = ri->loadRaw (true, tempImageNum, true, plistener, 0.8);
|
||||
// now tempImageNum is adjusted to the number of last frame
|
||||
|
||||
if (errCode) {
|
||||
return errCode;
|
||||
}
|
||||
ri->compress_image();
|
||||
ri->set_prefilters();
|
||||
riFrames[0] = ri;
|
||||
numFrames ++;
|
||||
|
||||
while (tempImageNum) {
|
||||
numFrames ++;
|
||||
ri = new RawImage(fname);
|
||||
int errCode = ri->loadRaw (true, tempImageNum, true, plistener, 0.8);
|
||||
@ -1520,9 +1532,10 @@ int RawImageSource::load (const Glib::ustring &fname, int imageNum, bool batch)
|
||||
riFrames[tempImageNum] = ri;
|
||||
ri->compress_image();
|
||||
ri->set_prefilters();
|
||||
} while (tempImageNum);
|
||||
tempImageNum --;
|
||||
}
|
||||
|
||||
if(numFrames > 1 ) {
|
||||
if(numFrames > 1 ) { // this disables multi frame support for Fuji S5 until I found a solution to handle different dimensions
|
||||
if(riFrames[0]->get_width() != riFrames[1]->get_width() || riFrames[0]->get_height() != riFrames[1]->get_height()) {
|
||||
numFrames = 1;
|
||||
}
|
||||
@ -1530,6 +1543,8 @@ int RawImageSource::load (const Glib::ustring &fname, int imageNum, bool batch)
|
||||
|
||||
std::cout << "numframes : " << numFrames << std::endl;
|
||||
|
||||
ri = riFrames[0];
|
||||
|
||||
if (plistener) {
|
||||
plistener->setProgress (0.9);
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ BayerProcess::BayerProcess () : FoldableToolPanel(this, "bayerprocess", M("TP_RA
|
||||
pack_start( *hb1, Gtk::PACK_SHRINK, 4);
|
||||
|
||||
imageNumberBox = Gtk::manage (new Gtk::HBox ());
|
||||
hb1->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_RAW_IMAGENUM") + ": ")), Gtk::PACK_SHRINK, 4);
|
||||
imageNumberBox->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_RAW_IMAGENUM") + ": ")), Gtk::PACK_SHRINK, 4);
|
||||
imageNumber = Gtk::manage (new MyComboBoxText ());
|
||||
imageNumber->append_text("1");
|
||||
imageNumber->append_text("2");
|
||||
|
Loading…
x
Reference in New Issue
Block a user