zoukankan      html  css  js  c++  java
  • Delphi Jpg和Gif转Bmp

    begin 
        bmp:=TBitmap.Create; 
        jpeg:=TJPEGImage.Create; 
        jpeg.LoadFromFile(fname); 
        with bmp do 
        begin 
          PixelFormat:=pf24bit; 
          Height:=60; 
          Width:=self.RzListBox.Width; 
          Canvas.Brush.Color:=$00F0EDE6; 
          Canvas.FillRect(Canvas.ClipRect); 
          Canvas.StretchDraw(Bounds(0,0,80,60), jpeg); 
        end; 
      //这里你可以用save之类的方法了 
      bmp.Free; 
      jpeg.Free; 


    --------------------------------------------------------

    --convert JPEG to BMP 

    uses 
      JPEG; 

    procedure JPEGt*****P(const FileName: TFileName); 
    var 
      jpeg: TJPEGImage; 
      bmp:  TBitmap; 
    begin 
      jpeg := TJPEGImage.Create; 
      try 
        jpeg.CompressionQuality := 100; {Default Value} 
        jpeg.LoadFromFile(FileName); 
        bmp := TBitmap.Create; 
        try 
          bmp.Assign(jpeg); 
          bmp.SaveTofile(ChangeFileExt(FileName, '.bmp')); 
        finally 
          bmp.Free 
        end; 
      finally 
        jpeg.Free 
      end; 
    end; 




    --------------------------------------------------------

    --有一个TGIFImage组件 

    function GifT*****p(filename: string): TBitmap; 
    var 
    GIF: TGIFImage; 
    begin 
    GIF := TGIFImage.Create; 
    try 
    GIF.LoadFromFile(filename); 
    Result := TBitmap.Create; 
    Result.Assign(GIF.Bitmap); 
    finally 
    GIF.Free; 
    end; 
    end;

    http://blog.csdn.net/yanjiaye520/article/details/6676323

  • 相关阅读:
    springmvc视图解析
    mysql外键是多个id组成的字符串,查询方法
    mysql服务无法启动(1067错误)时数据备份的经验
    springboot(5) freemarker
    springboot(4) Log之Logbak
    springboot(3) junit单元测试
    集合类基础知识
    springboot(2) 数据库操作
    springboot(1)
    linux命令
  • 原文地址:https://www.cnblogs.com/findumars/p/4999210.html
Copyright © 2011-2022 走看看