我想把一个JPG图片调出来在上面画个圆再保存,有什么控件没,VB,DELPHI都行

解决方案 »

  1.   

    procedure TForm1.BitBtn1Click(Sender: TObject);
    begin
      with Image1.Canvas do
      begin
        Ellipse(10,10,100,100);
      end;
      Image1.Picture.SaveToFile('C:\ff.bmp');
    end;
      

  2.   

    按chenzhuo(睡到自然醒) 
    1.出错,提示:
    can only modify an image if it contains a bitmap
      

  3.   

    不会吧,我这里都可以通过:
    procedure TForm1.BitBtn1Click(Sender: TObject);
    begin
      Image1.Picture.LoadFromFile('c:\Desktop.bmp');
      with Image1.Canvas do
      begin
        Ellipse(10,10,100,100);
      end;
      Image1.Picture.SaveToFile('C:\ff.bmp');
    end;
    我用的是bmp文件
      

  4.   

    var
      jpg :tjpegimage;
      bmp :TBitmap;
    begin
    Jpg:=Tjpegimage.Create;
      bmp:=Tbitmap.create;
      try
        Jpg.LoadFromFile('c:\2.JPG');
      except
         Jpg.Free;
         Exit;
      end;
      Bmp.Width:=Jpg.Width;
      Bmp.Height:=Jpg.Height;
      Bmp.Canvas.Draw(0,0,Jpg);
      bmp.Canvas.Ellipse(10,10,100,100);
      jpg.Assign(bmp);
      jpg.SaveToFile('c:\1.jpg');
      Jpg.Free;
      bmp.free
    end
      

  5.   

    Bitmap是可以画的。
    Jpg成问题,先转成Bitmap吧。
      

  6.   

    procedure TForm1.Button1Click(Sender: TObject);
    var
      bmp: TBitmap;
    begin
      bmp := TBitmap.Create();
      Image1.Picture.LoadFromFile('D:\339.JPG');
      bmp.Width := Image1.Picture.Width;
      bmp.Height := Image1.Picture.Height;
      bmp.Canvas.Draw(0, 0, Image1.Picture.Graphic);
      bmp.Canvas.Ellipse(20, 20, 80, 80);
      bmp.SaveToFile('D:\339.BMP');
      bmp.Free();
    end;