unit Jpeg 提供对JPEG的支持。你可以看DEMO 或者是 HELP目录你的具体例子。要操作的话。你转换成BMP处理。要放大。你简单的可以用 COPYRECT () 和 STRETCHDRAW()来实现。
要想放大后效果好些。可以在用BMP。SCANLINE[]方法做一些模糊什么的操作。相关问题论坛帖子不少。自己找吧。

解决方案 »

  1.   

    我也自己试过,放大缩小已经解决,其他的图象部分处理的也尝试过,就是有错误。我也知道用copyrect和stretchdraq,我需要具体的说明,谢谢了
      

  2.   

    现在的关键是点某个位置的车牌后,在另外的image2中放大显示这个点的附近区域的图片,也就是车牌
      

  3.   

    8用另外给分了。。我闲着无聊。随便写了点。。能用。呵呵
    unit asdf;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, Jpeg,ExtCtrls, StdCtrls, ExtDlgs;type
      TForm1 = class(TForm)
        ScrollBox1: TScrollBox;
        Image1: TImage;
        OP: TOpenPictureDialog;
        Button1: TButton;
        PaintBox1: TPaintBox;
        procedure Button1Click(Sender: TObject);
        procedure Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
          Y: Integer);
      private
        { Private declarations }
        OldP,NewP:TPoint;
        procedure JpgToBmp(JpegImageFileName:String; DstBmp: TBitmap);
        procedure BmpToJpg(SrcBmp:TBitmap; DstJpgFileName:string);
        procedure ZoomInRect(SrcDC: TCanvas;SrcRect:TRect; DstDC: TCanvas;
      DstRect: TRect);
      public
        { Public declarations }  end;var
      Form1: TForm1;implementation{$R *.dfm}{ TForm1 }procedure TForm1.JpgToBmp(JpegImageFileName:string; DstBmp: TBitmap);
    var
    jpg:TJpegImage;
    begin
      jpg:=TJpegImage.Create;
      try
        jpg.LoadFromFile(JpegImageFileName);
        DstBmp.Assign(Jpg);
      finally
      jpg.free;
      end;end;procedure TForm1.Button1Click(Sender: TObject);
    begin
     if op.Execute then
     begin
      image1.Picture.LoadFromFile(op.filename);
      JpgToBmp(op.filename,Image1.Picture.Bitmap);
      OldP:=Point(10000,10000);
      NewP:=OldP;
     end;
    end;procedure TForm1.BmpToJpg(SrcBmp:TBitmap; DstJpgFileName:string);
    var
    jpg:TJpegImage;
    begin
      jpg:=TJpegImage.Create;
      try
       jpg.Assign(SrcBmp);
       jpg.SaveToFile(DstJpgFileName);
      finally
      jpg.free;
      end;end;procedure TForm1.ZoomInRect(SrcDC: TCanvas;SrcRect:TRect; DstDC: TCanvas;
      DstRect: TRect);
    var
    bmp:TBitmap;
    begin
      bmp:=TBitmap.Create;
      try
       bmp.width:=SrcRect.right-SrcRect.left;
       bmp.height:=SrcRect.Bottom-SrcRect.top;
       with  bmp.Canvas do
       begin
       CopyRect(Rect(0,0,bmp.Width,Bmp.Height),SrcDC,SrcRect);
       end;
      DstDC.StretchDraw(DstRect,bmp);
      //DstDC.Draw(0,0,bmp);
      finally
      bmp.free;
      end;
    end;procedure TForm1.Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
    begin
    if image1.Picture.Bitmap.Empty  then  exit;
     ZoomInRect(Image1.Canvas,Rect(X-20,Y-10,X+20,Y+10),PaintBox1.Canvas,
         Rect(0,0,120,60));
        with image1.Canvas do
        begin
         if OldP.x<>10000 then
           begin
         Brush.Style:=bsClear;
         Pen.Mode:=pmNot;
         Rectangle(OldP.x-22,OldP.y-12,OldP.x+22,OldP.Y+12);
           end;
           NewP:=Point(X,Y);
         Brush.Style:=bsClear;
         Pen.Mode:=pmNot;
         Rectangle(Newp.X-22,NewP.Y-12,NewP.X+22,NEwP.Y+12);
         OldP:=NewP;
       end;
    end;end.