默认头像
路人甲
路人甲
  • 注册日期2004-03-31
  • 发帖数16
  • QQ
  • 铜币210枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1173回复:0

MAPX5.0+DELPHI为什么输出不了GIF,TIF,PNG?

楼主#
更多 发布于:2004-04-30 09:59

这个是我的代码为什么输出不了GIF PNG TIF 只能输出BMP? 求求你们了 帮助解决一下了

procedure Tfrmchange.suiButton1Click(Sender: TObject); var mapgif:string; begin      if frmchange.suiRadioButton1.Checked=true then      begin           if (length(suiedit1.Text)<>0) and (length(suiedit2.Text)<>0) then           begin                with main.frmmain do                begin                     savedialog1.Filter:='mapinfo(*.gif)|*.gif|';                     file://把图片以*.gif格式存储                     if savedialog1.Execute then                     if savedialog1.FileName<>'*.gif' then                     begin                          mapgif:=savedialog1.FileName;                          map1.PaperUnit:=5;                          map1.ExportMap(mapgif,2,StrToint(suiEdit1.Text),StrToint(suiEdit1.Text));                          file://exportap(文件路径名称,函数输出格式,高度,宽度)                    end;               end;           end           else           Application.MessageBox('数据有错,'+#13+'请重新输入!','错误',mb_ok or mb_iconError);      end;      if frmchange.suiRadioButton2.Checked=true then      begin           if (length(suiedit3.Text)<>0) and (length(suiedit4.Text)<>0) then           begin                frmchange.GroupBox2.Enabled:=true;                with main.frmmain do                begin                     savedialog1.Filter:='mapinfo(*.bmp)|*.bmp|';                     file://把图片以*.bmp 格式存储                     if savedialog1.Execute then                     if savedialog1.FileName<>'*.bmp' then                     begin                          mapgif:=savedialog1.FileName;                          map1.PaperUnit:=5;                          map1.ExportMap(mapgif,1,StrToint(suiEdit3.Text),StrToint(suiEdit4.Text));                          file://exportap(文件路径名称,函数输出格式,高度,宽度)                     end;                end;           end           else           Application.MessageBox('数据有错,'+#13+'请重新输入!','错误',mb_ok or mb_iconError);      end;      if frmchange.suiRadioButton3.Checked=true then      begin           if (length(suiedit5.Text)<>0) and (length(suiedit6.Text)<>0) then           begin                frmchange.GroupBox3.Enabled:=true;                with main.frmmain do                begin                     savedialog1.Filter:='mapinfo(*.tif)|*.tif|';                     file://把图片以*.tif 格式存储                     if savedialog1.Execute then                     if savedialog1.FileName<>'*.tif' then                     begin                          mapgif:=savedialog1.FileName;                          map1.PaperUnit:=5;                          map1.ExportMap(mapgif,4,StrToint(suiEdit5.Text),StrToint(suiEdit6.Text));                           file://exportap(文件路径名称,函数输出格式,高度,宽度)                     end;                end;           end           else           Application.MessageBox('数据有错,'+#13+'请重新输入!','错误',mb_ok or mb_iconError);      end;      if frmchange.suiRadioButton4.Checked=true then      begin           if (length(suiedit7.Text)<>0) and (length(suiedit8.Text)<>0) then           begin                frmchange.GroupBox4.Enabled:=true;                with main.frmmain do                begin                     savedialog1.Filter:='mapinfo(*.png)|*.png|';                     file://把图片以*.png 格式存储                     if savedialog1.Execute then                     if savedialog1.FileName<>'*.png' then                     begin                          mapgif:=savedialog1.FileName;                          map1.PaperUnit:=5;                          map1.ExportMap(mapgif,5,StrToint(suiEdit7.Text),StrToint(suiEdit8.Text));                          file://exportap(文件路径名称,函数输出格式,高度,宽度)                     end;                end;           end           else           Application.MessageBox('数据有错,'+#13+'请重新输入!','错误',mb_ok or mb_iconError);      end; close; end;

这个是我的代码为什么输出不了GIF PNG TIF 只能输出BMP? 求求你们了 帮助解决一下了

喜欢0 评分0
默认头像

返回顶部