代码之家  ›  专栏  ›  技术社区  ›  XBasic3000

如何确定图片是否包含Jpeg?

  •  2
  • XBasic3000  · 技术社区  · 16 年前

    我正在使用delphi7/2009。如何确定图片的内容?jpeg bmp png等?

    2 回复  |  直到 16 年前
        1
  •  4
  •   RRUZ    16 年前
    if (APicture.Graphic is TBitmap) then
    result := true 
    else 
    result := false;
    

    //替换TBitmap使其成为其他格式//

        2
  •  6
  •   kludg    16 年前
       if Picture.Graphic is TJPegImage then
         ShowMessage('JPEG')
       else if Picture.Graphic is TBitmap then
         ShowMessage('Bitmap');
    //etc