我用程序在一张BMP上写了一行字,用TJPEG转成JPG后,发现字体不清晰了.
我想得到一个清晰的字怎么办? 用Photoshop和ACDSee(选YUV111)后转后的都是清晰的,
为什么用TJPEG组件得到的字体边缘会有模糊的感觉,压缩质量已经是100了.

解决方案 »

  1.   

    什么做的效果好就用什么了。那就用photoshop好了,也许Tjpeg已经达到最好效果了。
      

  2.   

    没试过,不知是否会失真
    procedure TForm1.Button1Click(Sender: TObject); 
    (*压缩MBP为JPEG;但是没有提供压缩比可选项
    凑合用吧,大概1/3 ^_^: 
    Note:必须加上JPEG到Uses单元
    *) 
    var
    MyJPEG : TJPEGImage;
    MyBMP : TBitmap; 
    begin 
    MyBMP := TBitmap.Create; 
    with MyBMP do
    try 
    LoadFromFile('e:\lm.BMP'); //你的图片位置 
    MyJPEG := TJPEGImage.Create; 
    with MyJPEG do begin
    Assign(MyBMP); 
    CompressionQuality:=10; //压缩比例
    Compress;
    SaveToFile('e:\lm01.JPEG');//保存路径…… 
    Free; 
    end; 
    finally 
    Free; 
    end;
    end;