changeset 2:25a76c128804

Fix bugs.
author pyon@macmini
date Mon, 03 Feb 2014 18:51:33 +0900
parents 593c93e904b5
children cc1f1fa544a4
files myframe.cpp
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/myframe.cpp	Wed Jan 29 19:29:02 2014 +0900
+++ b/myframe.cpp	Mon Feb 03 18:51:33 2014 +0900
@@ -1,5 +1,5 @@
 // Filename   : myframe.cpp
-// Last Change: 29-Jan-2014.
+// Last Change: 03-Feb-2014.
 //
 
 #include "myframe.h"
@@ -52,6 +52,7 @@
 	m_comboBoxType->Append( wxT("ICON") );
 	m_comboBoxType->Append( wxT("BMP")  );
 	m_comboBoxType->Append( wxT("TIFF") );
+	m_comboBoxType->Append( wxT("JPEG") );
 	m_comboBoxType->SetSelection( 0 );
 	bSizerConfig->Add( m_comboBoxType, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
 	
@@ -227,6 +228,10 @@
         out_type = wxBITMAP_TYPE_TIFF;
         ext = wxT("tiff");
     }
+    else if ( choice_type == 7 ) {
+        out_type = wxBITMAP_TYPE_JPEG;
+        ext = wxT("jpg");
+    }
 
     wxImage image( file, in_type );
     if ( w == 0 || h == 0 ) {
@@ -280,6 +285,10 @@
         out_type = wxBITMAP_TYPE_TIFF;
         out_ext = wxT("tiff");
     }
+    else if ( choice_type == 7 ) {
+        out_type = wxBITMAP_TYPE_JPEG;
+        out_ext = wxT("jpg");
+    }
 
     wxArrayString files;
     wxDir::GetAllFiles( dir, &files, wxT("*.*"), wxDIR_DEFAULT );
@@ -306,7 +315,7 @@
         wxString fullpath = fn.GetPath() + wxFILE_SEP_PATH + fn.GetName();
 
         fullpath.Replace( dn.GetPath(), wxEmptyString, false );
-        fullpath = out_dir + fullpath + wxT(".") + out_ext;
+        fullpath = out_dir + wxFILE_SEP_PATH + fullpath + wxT(".") + out_ext;
 
         wxFileName tf( fullpath );
         if ( !tf.Exists() ) tf.Mkdir( wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL );