Mercurial > mercurial > hgweb_golang.cgi
comparison src/kaigo/horori/alloc/alloc.cpp @ 52:1c7bf24c63e6
alloc.cpp: small improve.
author | pyon@macmini |
---|---|
date | Tue, 12 May 2020 20:00:11 +0900 |
parents | 4e14902379da |
children | 665f92c37b72 |
comparison
equal
deleted
inserted
replaced
51:4e14902379da | 52:1c7bf24c63e6 |
---|---|
1 // Filename : alloc.cpp | 1 // Filename : alloc.cpp |
2 // Last Change: 2020-04-27 月 14:11:08. | 2 // Last Change: 2020-05-12 火 16:28:18. |
3 // | 3 // |
4 #include <wx/dir.h> | 4 #include <wx/dir.h> |
5 #include <wx/filefn.h> | 5 #include <wx/filefn.h> |
6 #include <wx/textfile.h> | 6 #include <wx/textfile.h> |
7 #include <wx/utils.h> | 7 #include <wx/utils.h> |
94 m_dirPickerWork->SetPath(work); | 94 m_dirPickerWork->SetPath(work); |
95 } | 95 } |
96 | 96 |
97 void AllocFrame::Pdf2Tif() | 97 void AllocFrame::Pdf2Tif() |
98 { | 98 { |
99 wxCopyFile(m_filePickerPdf1->GetPath(), m_dirPickerWork->GetPath() + wxFILE_SEP_PATH + wxT("1.pdf")); | 99 wxString kanso = m_filePickerPdf1->GetPath(); |
100 wxCopyFile(m_filePickerPdf2->GetPath(), m_dirPickerWork->GetPath() + wxFILE_SEP_PATH + wxT("2.pdf")); | 100 wxString normal = m_filePickerPdf2->GetPath(); |
101 | |
102 if (!kanso.IsEmpty()) | |
103 wxCopyFile(kanso, m_dirPickerWork->GetPath() + wxFILE_SEP_PATH + wxT("1.pdf")); | |
104 wxCopyFile(normal, m_dirPickerWork->GetPath() + wxFILE_SEP_PATH + wxT("2.pdf")); | |
101 | 105 |
102 wxString batchfile = m_dirPickerWork->GetPath() + wxFILE_SEP_PATH + wxT("alloc.bat"); | 106 wxString batchfile = m_dirPickerWork->GetPath() + wxFILE_SEP_PATH + wxT("alloc.bat"); |
103 wxTextFile textfile; | 107 wxTextFile textfile; |
104 | 108 |
105 wxString cmd; | 109 wxString cmd; |
106 textfile.Create(batchfile); | 110 textfile.Create(batchfile); |
107 | 111 |
108 cmd = wxT("cd ") + m_dirPickerWork->GetPath(); | 112 cmd = wxT("cd ") + m_dirPickerWork->GetPath(); |
109 textfile.AddLine(cmd); | 113 textfile.AddLine(cmd); |
110 | 114 |
111 cmd = wxT("\"C:\\Program Files\\gs\\gs9.50\\bin\\gswin64c.exe\" -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=a.pdf 1.pdf 2.pdf"); | 115 //cmd = wxT("\"C:\\Program Files\\gs\\gs9.50\\bin\\gswin64c.exe\" -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=a.pdf 1.pdf 2.pdf"); |
116 cmd = wxT("\"C:\\Program Files\\gs\\gs9.50\\bin\\gswin64c.exe\" -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=a.pdf "); | |
117 if (!kanso.IsEmpty()) cmd += wxT("1.pdf "); | |
118 cmd += wxT("2.pdf"); | |
112 textfile.AddLine(cmd); | 119 textfile.AddLine(cmd); |
113 | 120 |
114 for (int i = 0; i < 50; i++) { | 121 for (int i = 0; i < 50; i++) { |
115 cmd = wxString::Format(wxT("magick -density 400 a.pdf[%d] _%02d.jpg"), i, i + 1); | 122 cmd = wxString::Format(wxT("magick -density 400 a.pdf[%d] _%02d.jpg"), i, i + 1); |
116 textfile.AddLine(cmd); | 123 textfile.AddLine(cmd); |