| | |
| | | End; |
| | | End; |
| | | //ShowMessage(IntToStr(iGraphic.Palette.palNumEntries)); |
| | | if (iGraphic.Palette.palNumEntries = 0) or (iGraphic.Palette.palNumEntries = 256) then //20171130 彩色 會為0 黑白 為2 灰階256 |
| | | if iGraphic.ImageFormat = ifBlackWhite then //20200806 出現無法匯入,是因color256無法壓JPEG,待報會後再開啟 |
| | | begin |
| | | iGraphic.Compression:=tcGroup4; |
| | | end |
| | | else if iGraphic.ImageFormat= ifColor256 then |
| | | begin |
| | | ConverttoGray(iGraphic); |
| | | iGraphic.Compression:=tcJPEG; |
| | | iGraphic.JpegQuality:=cooom; |
| | | end |
| | | else if (iGraphic.ImageFormat = ifTrueColor) or (iGraphic.ImageFormat = ifGray256) then |
| | | begin |
| | | iGraphic.Compression:=tcJPEG; |
| | | iGraphic.JpegQuality:=cooom; |
| | | end |
| | | else |
| | | begin |
| | | iGraphic.Compression:=tcLZW; |
| | | end; |
| | | |
| | | {if (iGraphic.Palette.palNumEntries = 0) or (iGraphic.Palette.palNumEntries = 256) then //20171130 彩色 會為0 黑白 為2 灰階256 //20200806拿掉 |
| | | begin |
| | | iGraphic.Compression:=tcJPEG; |
| | | iGraphic.JpegQuality:=cooom; |
| | | end;} |
| | | |
| | | If LowerCase(ExtractFileExt(SavePath + SaveFilename)) = '.tif' Then |
| | | Begin |
| | |
| | | Anchor := FormID2Anchor(FormID); |
| | | //ParserPoint(CropMpsV.FindPoint(Anchor)); |
| | | FindPoint(ImageScrollBox1.Graphic,UpLPoint,UpRPoint,DownLPoint,Anchor); |
| | | if FileExists(CheckXmlPath+FormID+'.xml') then //沒有Xml就不用遮罩 |
| | | if FileExists(CheckXmlPath+FWork_no+'\'+FormID+'.xml') then //沒有Xml就不用遮罩 |
| | | begin |
| | | XT.LoadFromFile(CheckXmlPath+FormID+'.xml'); |
| | | XT.LoadFromFile(CheckXmlPath+FWork_no+'\'+FormID+'.xml'); |
| | | if XT.SubNodes['/form/settype10/'].First then |
| | | Repeat |
| | | ColEName := XT.SubNodes['/form/settype10/'].NodeName; |
| | |
| | | //Display1.Lines.Add('OMRFile='+OMRFile+',OMRFormCode='+OMRFormCode+',OMRFormName='+OMRFormName); |
| | | LogFile1.LogToFile(logTimeString+'OMRFile='+OMRFile+',OMRFormCode='+OMRFormCode+',OMRFormName='+OMRFormName); |
| | | //ShowMessage('KKKKK'); |
| | | if not FileExists(CheckXmlPath+OMRFormCode+'.xml') then //沒有Xml就不用檢核 |
| | | if not FileExists(CheckXmlPath+FWork_no+'\'+OMRFormCode+'.xml') then //沒有Xml就不用檢核 |
| | | Continue; |
| | | |
| | | //ShowMessage('11638 OMRFileList.Strings['+IntToStr(i)+']'+OMRFileList.Strings[i]); |
| | | XT := TXmltool.Create(CheckXmlPath+OMRFormCode+'.xml'); |
| | | XT := TXmltool.Create(CheckXmlPath+FWork_no+'\'+OMRFormCode+'.xml'); |
| | | RelaXT := TXmltool.Create; |
| | | //ShowMessage('ModeNeedCheck='+BoolToStr(ModeNeedCheck(OMRErrInfo[4].Mode,FMode),true)); |
| | | try |
| | |
| | | RelaFile := FormCode2FileName(RelaFormCode,ContextList); |
| | | RelaFormName := FormCode2FormName(CaseID,RelaFormCode); |
| | | Anchor1 := FormID2Anchor(RelaFormCode); |
| | | RelaXT.LoadFromFile(CheckXmlPath+RelaFormCode+'.xml'); |
| | | RelaXT.LoadFromFile(CheckXmlPath+FWork_no+'\'+RelaFormCode+'.xml'); |
| | | Display1.Lines.Add(RelaFile+','+RelaFormName); |
| | | //ShowMessage(RelaFile); |
| | | //ShowMessage(ImageSavePath+CaseID+'\upload\'+RelaFile); |
| | |
| | | RelaFile := FormCode2FileName(RelaFormCode,ContextList); |
| | | RelaFormName := FormCode2FormName(CaseID,RelaFormCode); |
| | | Anchor1 := FormID2Anchor(RelaFormCode); |
| | | RelaXT.LoadFromFile(CheckXmlPath+RelaFormCode+'.xml'); |
| | | RelaXT.LoadFromFile(CheckXmlPath+FWork_no+'\'+RelaFormCode+'.xml'); |
| | | |
| | | if RelaFile<>'' then |
| | | begin |
| | |
| | | end; |
| | | if FileExists(CheckXmlPath+'OMRSet.zip') then //有更新 |
| | | begin |
| | | ExecuteUnZip(CheckXmlPath+'OMRSet.zip',CheckXmlPath,False); |
| | | ExecuteUnZip(CheckXmlPath+'OMRSet.zip',CheckXmlPath,True); |
| | | S.Clear; |
| | | S.Add(ServerDate+GetBalance2Time(Balance)); |
| | | S.SaveToFile(CheckXmlPath+'LastDateTime.dat'); |
| | |
| | | end; |
| | | if FileExists(SitePath+'KeyinSet.zip') then //有更新 |
| | | begin |
| | | ExecuteUnZip(SitePath+'KeyinSet.zip',SitePath,False); |
| | | ExecuteUnZip(SitePath+'KeyinSet.zip',SitePath,True); |
| | | S.Clear; |
| | | S.Add(ServerDate+GetBalance2Time(Balance)); |
| | | S.SaveToFile(SitePath+'LastDateTime.dat'); |
| | |
| | | if ImagePath[Length(ImagePath)] <> '\' then |
| | | ImagePath := ImagePath + '\'; |
| | | //ShowMessage('ImagePath='+ImagePath); |
| | | CheckXmlPath := ImagePath+'OMRSITE\'+FWork_No; |
| | | //CheckXmlPath := ImagePath+'OMRSITE\'+FWork_No; |
| | | CheckXmlPath := ImagePath+'OMRSITE\'; // 20200612 發現影像平台是取回所有業務的設定,所以不能有業務別目錄 |
| | | //ShowMessage('CheckXmlPath='+CheckXmlPath); |
| | | SitePath := ImagePath+'Site\'+FWork_No+'\'; |
| | | //SitePath := ImagePath+'Site\'+FWork_No+'\'; |
| | | SitePath := ImagePath+'Site\'; // 20200612 發現影像平台是取回所有業務的設定,所以不能有業務別目錄 |
| | | LngPath := ImagePath; |
| | | SamplePath := ImagePath+'Sample\'+FWork_No+'\'; |
| | | ImagePath := ImagePath + 'Scantemp\'; |