From: <har...@us...> - 2010-02-19 17:28:37
|
Revision: 4996 http://hugin.svn.sourceforge.net/hugin/?rev=4996&view=rev Author: harryvanderwolf Date: 2010-02-19 17:28:01 +0000 (Fri, 19 Feb 2010) Log Message: ----------- KImageFuser 0.4b beta version Modified Paths: -------------- KImageFuser/Changelog KImageFuser/KImageFuser.kmdr Modified: KImageFuser/Changelog =================================================================== --- KImageFuser/Changelog 2010-02-19 06:19:10 UTC (rev 4995) +++ KImageFuser/Changelog 2010-02-19 17:28:01 UTC (rev 4996) @@ -1,3 +1,9 @@ +0.4.0b 19 February 2010 +- Fix exiftool error +- Tiff thumbnails were not displayed +- batch run incorrect when ¨Use main screen enfuse settings" was selected + (due to modified enfuse parameter handling) + 0.4.0a 16 January 2010 - Fix number of minor issues - Add option to select output format (only in main screen) Modified: KImageFuser/KImageFuser.kmdr =================================================================== --- KImageFuser/KImageFuser.kmdr 2010-02-19 06:19:10 UTC (rev 4995) +++ KImageFuser/KImageFuser.kmdr 2010-02-19 17:28:01 UTC (rev 4996) @@ -582,7 +582,7 @@ <cstring>ImageInfo</cstring> </property> <property name="text"> - <string>Image Info</string> + <string>Ima&ge Info</string> </property> <property name="associations" stdset="0"> <stringlist> @@ -688,7 +688,8 @@ ProgressBarText.setText("Convert " + FileName + " for fused preview.") exec(convertstring) //thumbconvertstring="convert \"" + Img + "\" -sample 75x75 \"/tmp/thumb" + FileName + "\"" - if (_fileext == ".tif") then // kommander can't display tiffs + if ((str_find(FileName, ".tif") <> -1) || (str_find(FileName, ".TIF") <> -1)) then + //if ((_fileext == ".tif") || (_fileext == ".TIF")) then // kommander can't display tiffs thumbconvertstring="convert \"/tmp/" + FileName + "\" -sample 75x75 \"/tmp/thumb" + FileName + ".jpg\"" exec(thumbconvertstring) //message_info(thumbconvertstring) @@ -1177,130 +1178,6 @@ <string>This will create a HDR image from your source images only using align_image_stack</string> </property> </widget> - <widget class="ExecButton"> - <property name="name"> - <cstring>EnfuseButton</cstring> - </property> - <property name="geometry"> - <rect> - <x>770</x> - <y>533</y> - <width>160</width> - <height>24</height> - </rect> - </property> - <property name="text"> - <string>Create Enf&used image</string> - </property> - <property name="associations" stdset="0"> - <stringlist> - <string>//HomePath=env("HOME") -_SaveFile=input_savefile(PrefSaveDirectory.text, "Please give the name for the file without extension") -//message_info(SaveFile) -//message_info(_TheFilesString) - -if(str_length(_SaveFile) < 1) then - message_error("You did not give a filename or Canceled! Please provide a name.") -endif - -if(str_length(_SaveFile) > 0) then - -//fileext.execute -//message_info("file extensie is " + _fileext) -//message_info(_TheFilesString) -if AISCheckBox.checked then - exec("rm -rf /tmp/fused*.tif") - //message_info("AIS checkbox is checked") - AISParam.execute - alignstring="align_image_stack " + _AISParam + " -a /tmp/fused " + _TheFilesString - ProgressBarText.setText("Aligning your source images before fusing") - //exec(alignstring) - execBackground(alignstring) - AlignImageStackLoop.execute - //message_info("AIS finished") - EnfuseParam.execute - //message_info(enfusestring) - ProgressBar1.setVisible(true) - ProgressBarText.setText("Fusing your Image") - ProgressBar1.setMaximum(2) - ProgressBar1.setText(1) - if (UseEnfuse4x.checked == 1) then - // format, compression and output depth are set in EnfuseParam - enfusestring=("enfuse " + _EnfuseParam + " -o \"" + _SaveFile + _newfileext + "\" /tmp/fused*.tif") - exec(enfusestring) - else - // With enblend 3.x we first need to do a standard output and than convert - if (_fileext == ".jpg") then - enfusestring=("enfuse --compression=95 " + _EnfuseParam + " -o \"" + _SaveFile + _fileext + "\" /tmp/fused*.tif") - elseif (_fileext == ".tif") then - enfusestring=("enfuse --compression=LZW " + _EnfuseParam + " -o \"" + _SaveFile + _fileext + "\" /tmp/fused*.tif") - else // extension is png - enfusestring=("enfuse " + _EnfuseParam + " -o \"" + _SaveFile + _fileext + "\" /tmp/fused*.tif") - endif - exec(enfusestring) - // Now convert to desired output format - convertstring=("convert \"" + _SaveFile + _fileext + "\" " + _convert_depth + " " + _convertcompr + " \"" + _SaveFile + _convert_fileext + "\"") - exec(convertstring) - //message_info("convertstring " + convertstring) - //correct for exiftool and viewer - _newfileext=_convert_fileext - endif - ProgressBar1.setText(2) -else - ProgressBar1.setVisible(true) - ProgressBarText.setText("Fusing your Image") - ProgressBar1.setMaximum(2) - ProgressBar1.setText(1) - EnfuseParam.execute - //enfusestring=("enfuse --compression=95 " + _EnfuseParam + " -o " + SaveFile + _fileext + " " + _TheFilesString) - if (UseEnfuse4x.checked == 1) then - // format, compression and output depth are set in EnfuseParam - enfusestring=("enfuse " + _EnfuseParam + " -o \"" + _SaveFile + _newfileext + "\" " + _TheFilesString) - exec(enfusestring) - else - // With enblend 3.x we first need to do a standard output and than convert - if (_fileext == ".jpg") then - enfusestring=("enfuse --compression=95 " + _EnfuseParam + " -o \"" + _SaveFile + _fileext + "\" " + _TheFilesString) - elseif (_fileext == ".tif") then - enfusestring=("enfuse --compression=LZW " + _EnfuseParam + " -o \"" + _SaveFile + _fileext + "\" " + _TheFilesString) - else // extension is png - enfusestring=("enfuse " + _EnfuseParam + " -o \"" + _SaveFile + _fileext + "\" " + _TheFilesString) - endif - exec(enfusestring) - // Now convert to desired output format - convertstring=("convert \"" + _SaveFile + _fileext + "\" " + _convert_depth + " " + _convertcompr + " \"" + _SaveFile + _convert_fileext + "\"") - exec(convertstring) - //message_info("convertstring " + convertstring) - //correct for exiftool and viewer - _newfileext=_convert_fileext - endif - //message_info(enfusestring) -endif -ProgressBar1.setVisible(false) -ProgressBarText.setText("") - -if (_newfileext <> _fileext) then - exec("rm -rf \"" + _SaveFile + _fileext + "\"") -endif - -//Use exiftool if desired -if (UseExifTool.checked ==1) then - _SourceFileName="\"" + Table1.cellText(0, 0) + "\"" - _DestFileName="\"" + _SaveFile + _newfileext + "\"" - ExifToolScript.execute -endif - -if ShowImage.checked then - execBackground(ImgViewerSelection.selection + " \"" + _SaveFile + _newfileext + "\"") -endif - -endif //check of file name length</string> - </stringlist> - </property> - <property name="toolTip" stdset="0"> - <string>This will create an enfused LDR image from your source images.</string> - </property> - </widget> <widget class="TabWidget"> <property name="name"> <cstring>TabWidget3_2</cstring> @@ -1966,6 +1843,10 @@ _convertcompr="" _convert_depth="" +// The batch does not support changing output yet, so for the time being +// we need an if loop checking for _batchrun which is set just before checking +// enfuse param +if (_batchrun == "false") then if (OutputFormatSelector.selection == "8bit JPG") then ext=".jpg" depth="--depth=8" @@ -2003,6 +1884,7 @@ depth="--depth=32" _convert_depth="-depth 32" endif +endif // in this case of the _batchrun loop //message_info("output " + OutputFormatSelector.selection + " ext " + ext + " depth "+ depth + " convertdepth " + _convert_depth + " _convertcompr " + _convertcompr) @@ -2166,7 +2048,9 @@ <property name="associations" stdset="0"> <stringlist> <string>PreParam=" -overwrite_original_in_place -TagsFromFile " -CopyParam=" -ImageDescription -Make -Model -Artist -WhitePoint -Copyright -GPS:all -DateTimeOriginal -CreateDate -UserComment -OwnerName -SerialNumber -IPTC:all -JFIF:all -XResolution -YResolution -FocalLength -FocalLengthIn35mmFormat -Orientation -ResolutionUnit -Lens -ColorSpace -icc_profile -XMP -Software='" + ApplicationName.text + "'" +//CopyParam=" -ImageDescription -Make -Model -Artist -WhitePoint -Copyright -GPS:all -DateTimeOriginal -CreateDate -UserComment -OwnerName -SerialNumber -IPTC:all -JFIF:all -XResolution -YResolution -FocalLength -FocalLengthIn35mmFormat -Orientation -ResolutionUnit -Lens -ColorSpace -icc_profile -XMP -Software='" + ApplicationName.text + "'" +//CopyParam=" " +CopyParam=" -ImageDescription -Make -Model -Artist -WhitePoint -Copyright -GPS:all -DateTimeOriginal -CreateDate -UserComment -OwnerName -SerialNumber -IPTC:all -JFIF:all -XResolution -YResolution -FocalLength -FocalLengthIn35mmFormat -Orientation -ResolutionUnit -Lens -ColorSpace -icc_profile -XMP " //Note: _SourceFileName and _DestFileName come escaped exec("exiftool " + PreParam + " " + _SourceFileName + " " + CopyParam + " " + _DestFileName) @@ -2926,6 +2810,133 @@ </widget> </widget> </widget> + <widget class="ExecButton"> + <property name="name"> + <cstring>EnfuseButton</cstring> + </property> + <property name="geometry"> + <rect> + <x>770</x> + <y>533</y> + <width>160</width> + <height>24</height> + </rect> + </property> + <property name="text"> + <string>Create Enf&used image</string> + </property> + <property name="associations" stdset="0"> + <stringlist> + <string>//HomePath=env("HOME") +// temporary setting as batchrun does not support switching output +_batchrun = "false" //Temporary until batch run support switching output as well + +_SaveFile=input_savefile(PrefSaveDirectory.text, "Please give the name for the file without extension") +//message_info(SaveFile) +//message_info(_TheFilesString) + +if(str_length(_SaveFile) < 1) then + message_error("You did not give a filename or Canceled! Please provide a name.") +endif + +if(str_length(_SaveFile) > 0) then + +//fileext.execute +//message_info("file extensie is " + _fileext) +//message_info(_TheFilesString) +if AISCheckBox.checked then + exec("rm -rf /tmp/fused*.tif") + //message_info("AIS checkbox is checked") + AISParam.execute + alignstring="align_image_stack " + _AISParam + " -a /tmp/fused " + _TheFilesString + ProgressBarText.setText("Aligning your source images before fusing") + //exec(alignstring) + execBackground(alignstring) + AlignImageStackLoop.execute + //message_info("AIS finished") + EnfuseParam.execute + //message_info(enfusestring) + ProgressBar1.setVisible(true) + ProgressBarText.setText("Fusing your Image") + ProgressBar1.setMaximum(2) + ProgressBar1.setText(1) + if (UseEnfuse4x.checked == 1) then + // format, compression and output depth are set in EnfuseParam + enfusestring=("enfuse " + _EnfuseParam + " -o \"" + _SaveFile + _newfileext + "\" /tmp/fused*.tif") + exec(enfusestring) + else + // With enblend 3.x we first need to do a standard output and than convert + if (_fileext == ".jpg") then + enfusestring=("enfuse --compression=95 " + _EnfuseParam + " -o \"" + _SaveFile + _fileext + "\" /tmp/fused*.tif") + elseif (_fileext == ".tif") then + enfusestring=("enfuse --compression=LZW " + _EnfuseParam + " -o \"" + _SaveFile + _fileext + "\" /tmp/fused*.tif") + else // extension is png + enfusestring=("enfuse " + _EnfuseParam + " -o \"" + _SaveFile + _fileext + "\" /tmp/fused*.tif") + endif + exec(enfusestring) + // Now convert to desired output format + convertstring=("convert \"" + _SaveFile + _fileext + "\" " + _convert_depth + " " + _convertcompr + " \"" + _SaveFile + _convert_fileext + "\"") + exec(convertstring) + //message_info("convertstring " + convertstring) + //correct for exiftool and viewer + _newfileext=_convert_fileext + endif + ProgressBar1.setText(2) +else + ProgressBar1.setVisible(true) + ProgressBarText.setText("Fusing your Image") + ProgressBar1.setMaximum(2) + ProgressBar1.setText(1) + EnfuseParam.execute + //enfusestring=("enfuse --compression=95 " + _EnfuseParam + " -o " + SaveFile + _fileext + " " + _TheFilesString) + if (UseEnfuse4x.checked == 1) then + // format, compression and output depth are set in EnfuseParam + enfusestring=("enfuse " + _EnfuseParam + " -o \"" + _SaveFile + _newfileext + "\" " + _TheFilesString) + exec(enfusestring) + else + // With enblend 3.x we first need to do a standard output and than convert + if (_fileext == ".jpg") then + enfusestring=("enfuse --compression=95 " + _EnfuseParam + " -o \"" + _SaveFile + _fileext + "\" " + _TheFilesString) + elseif (_fileext == ".tif") then + enfusestring=("enfuse --compression=LZW " + _EnfuseParam + " -o \"" + _SaveFile + _fileext + "\" " + _TheFilesString) + else // extension is png + enfusestring=("enfuse " + _EnfuseParam + " -o \"" + _SaveFile + _fileext + "\" " + _TheFilesString) + endif + exec(enfusestring) + // Now convert to desired output format + convertstring=("convert \"" + _SaveFile + _fileext + "\" " + _convert_depth + " " + _convertcompr + " \"" + _SaveFile + _convert_fileext + "\"") + exec(convertstring) + //message_info("convertstring " + convertstring) + //correct for exiftool and viewer + _newfileext=_convert_fileext + endif + //message_info(enfusestring) +endif +ProgressBar1.setVisible(false) +ProgressBarText.setText("") + +if (_newfileext <> _fileext) then + exec("rm -rf \"" + _SaveFile + _fileext + "\"") +endif + +//Use exiftool if desired +if (UseExifTool.checked ==1) then + _SourceFileName="\"" + Table1.cellText(0, 0) + "\"" + _DestFileName="\"" + _SaveFile + _newfileext + "\"" + ExifToolScript.execute +endif + +if ShowImage.checked then + execBackground(ImgViewerSelection.selection + " \"" + _SaveFile + _newfileext + "\"") +endif + +endif //check of file name length</string> + </stringlist> + </property> + <property name="toolTip" stdset="0"> + <string>This will create an enfused LDR image from your source images.</string> + </property> + </widget> </widget> <widget class="QWidget"> <property name="name"> @@ -3066,6 +3077,7 @@ BatchAlignImageStackloop.execute //message_info("AIS finished") if (UseMainScreenEnfuseSettings.checked == 1) then + _batchrun = "true" //Temporary until batch run support switching output as well EnfuseParam.execute if (_fileext == ".jpg") then enfusestring=("enfuse --compression=95 " + _EnfuseParam + " -o " + FileName + " /tmp/fused*.tif") @@ -3100,6 +3112,7 @@ ProgressBar3.setMaximum(2) ProgressBar3.setText(1) if (UseMainScreenEnfuseSettings.checked == 1) then + _batchrun = "true" //Temporary until batch run support switching output as well EnfuseParam.execute if (_fileext == ".jpg") then enfusestring=("enfuse --compression=95 " + _EnfuseParam + " -o " + FileName + " " + _ImgSet) @@ -3567,19 +3580,6 @@ </spacer> </grid> </widget> - <widget class="Label"> - <property name="name"> - <cstring>Directory</cstring> - </property> - <property name="geometry"> - <rect> - <x>450</x> - <y>30</y> - <width>480</width> - <height>16</height> - </rect> - </property> - </widget> <widget class="Table"> <property name="name"> <cstring>Table2</cstring> @@ -3599,6 +3599,101 @@ <number>0</number> </property> </widget> + <widget class="ScriptObject"> + <property name="name"> + <cstring>batchfileext</cstring> + </property> + <property name="geometry"> + <rect> + <x>310</x> + <y>530</y> + <width>32</width> + <height>32</height> + </rect> + </property> + <property name="associations" stdset="0"> + <stringlist> + <string>if (str_find(_ImgSet, ".jpg") <> -1) then + _fileext=".jpg" +elseif (str_find(_ImgSet, ".JPG") <> -1) then + _fileext=".jpg" +elseif (str_find(_ImgSet, ".png") <> -1) then + _fileext=".png" +elseif (str_find(_ImgSet, ".PNG") <> -1) then + _fileext=".png" +elseif (str_find(_ImgSet, ".tif") <> -1) then + _fileext=".tif" +elseif (str_find(_ImgSet, ".TIF") <> -1) then + _fileext=".tif" +endif +// last two not necessary, but we might expand +</string> + </stringlist> + </property> + </widget> + <widget class="ScriptObject"> + <property name="name"> + <cstring>BatchAlignImageStackloop</cstring> + </property> + <property name="geometry"> + <rect> + <x>390</x> + <y>530</y> + <width>32</width> + <height>32</height> + </rect> + </property> + <property name="associations" stdset="0"> + <stringlist> + <string>//Done=1 +MaxCounter=str_toint(SB_Img_per_Set.text) + 1 +TotSets=str_toint(Table2.rowCount)/str_toint(SB_Img_per_Set.text) +//message_info(MaxCounter) +ProgressBar3.setVisible(true) +BatchProgressTxt.setVisible(true) +BatchProgressTxt.setText("Aligning source images") +ProgressBar3.setMaximum(MaxCounter) + +counter=0 +while (counter < MaxCounter) do + counter=exec("ls -lrt /tmp/fused*.tif |wc -l") + //message_info(counter) + ProgressBar3.setText(counter) + BatchProgressTxt.setText("") + counter=str_toint(counter)+1 + BatchProgressTxt.setText("Aligning source image number " + counter + " from set " + _SetNo + "/" + TotSets) +end + +//prevent timing options if align_image_stack is still writing and ls +// reports the last file already available +alignstillrunning=1 +while (alignstillrunning==1) do + checkAIS=exec("ps -ef | grep -i " + _ImgSet) + if (str_find(checkAIS, "align_image_stack") == -1) then + alignstillrunning=0 + endif + +end + +ProgressBar3.setVisible(false) +BatchProgressTxt.setText("") +</string> + </stringlist> + </property> + </widget> + <widget class="Label"> + <property name="name"> + <cstring>Directory</cstring> + </property> + <property name="geometry"> + <rect> + <x>450</x> + <y>30</y> + <width>480</width> + <height>16</height> + </rect> + </property> + </widget> <widget class="QLayoutWidget"> <property name="name"> <cstring>Layout25</cstring> @@ -3607,8 +3702,8 @@ <rect> <x>10</x> <y>502</y> - <width>438</width> - <height>26</height> + <width>490</width> + <height>28</height> </rect> </property> <hbox> @@ -3714,95 +3809,13 @@ </widget> </hbox> </widget> - <widget class="ScriptObject"> - <property name="name"> - <cstring>batchfileext</cstring> - </property> - <property name="geometry"> - <rect> - <x>310</x> - <y>530</y> - <width>32</width> - <height>32</height> - </rect> - </property> - <property name="associations" stdset="0"> - <stringlist> - <string>if (str_find(_ImgSet, ".jpg") <> -1) then - _fileext=".jpg" -elseif (str_find(_ImgSet, ".JPG") <> -1) then - _fileext=".jpg" -elseif (str_find(_ImgSet, ".png") <> -1) then - _fileext=".png" -elseif (str_find(_ImgSet, ".PNG") <> -1) then - _fileext=".png" -elseif (str_find(_ImgSet, ".tif") <> -1) then - _fileext=".tif" -elseif (str_find(_ImgSet, ".TIF") <> -1) then - _fileext=".tif" -endif -// last two not necessary, but we might expand -</string> - </stringlist> - </property> - </widget> - <widget class="ScriptObject"> - <property name="name"> - <cstring>BatchAlignImageStackloop</cstring> - </property> - <property name="geometry"> - <rect> - <x>390</x> - <y>530</y> - <width>32</width> - <height>32</height> - </rect> - </property> - <property name="associations" stdset="0"> - <stringlist> - <string>//Done=1 -MaxCounter=str_toint(SB_Img_per_Set.text) + 1 -TotSets=str_toint(Table2.rowCount)/str_toint(SB_Img_per_Set.text) -//message_info(MaxCounter) -ProgressBar3.setVisible(true) -BatchProgressTxt.setVisible(true) -BatchProgressTxt.setText("Aligning source images") -ProgressBar3.setMaximum(MaxCounter) - -counter=0 -while (counter < MaxCounter) do - counter=exec("ls -lrt /tmp/fused*.tif |wc -l") - //message_info(counter) - ProgressBar3.setText(counter) - BatchProgressTxt.setText("") - counter=str_toint(counter)+1 - BatchProgressTxt.setText("Aligning source image number " + counter + " from set " + _SetNo + "/" + TotSets) -end - -//prevent timing options if align_image_stack is still writing and ls -// reports the last file already available -alignstillrunning=1 -while (alignstillrunning==1) do - checkAIS=exec("ps -ef | grep -i " + _ImgSet) - if (str_find(checkAIS, "align_image_stack") == -1) then - alignstillrunning=0 - endif - -end - -ProgressBar3.setVisible(false) -BatchProgressTxt.setText("") -</string> - </stringlist> - </property> - </widget> </widget> <widget class="QWidget"> <property name="name"> <cstring>tab</cstring> </property> <attribute name="title"> - <string>Sett&ings</string> + <string>Settin&gs</string> </attribute> <widget class="QLayoutWidget"> <property name="name"> @@ -4295,6 +4308,24 @@ </spacer> <widget class="Label"> <property name="name"> + <cstring>Label9</cstring> + </property> + <property name="geometry"> + <rect> + <x>8</x> + <y>103</y> + <width>550</width> + <height>53</height> + </rect> + </property> + <property name="text"> + <string>Written by Harry van der Wolf (2009-2010). This version: 16 January 2010. + +This script may be freely distributed under the GPL license.</string> + </property> + </widget> + <widget class="Label"> + <property name="name"> <cstring>Label37</cstring> </property> <property name="geometry"> @@ -4319,27 +4350,9 @@ </font> </property> <property name="text"> - <string>KImageFuser 0.4.0a</string> + <string>KImageFuser 0.4.0b</string> </property> </widget> - <widget class="Label"> - <property name="name"> - <cstring>Label9</cstring> - </property> - <property name="geometry"> - <rect> - <x>8</x> - <y>103</y> - <width>550</width> - <height>53</height> - </rect> - </property> - <property name="text"> - <string>Written by Harry van der Wolf (2009-2010). This version: 16 January 2010. - -This script may be freely distributed under the GPL license.</string> - </property> - </widget> </widget> </widget> </widget> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |