为什么不是?
用TImage控件载入一BitMap图形,设置其Transparent:=True;则此Bitmap的最右下角一点的色值会变为透明色

解决方案 »

  1.   

    to li_zhifu(东北人):
      你上机试试就知道了。
      

  2.   

    没问题呀,记住,一定要用Bitmap的图,哦,是左下角的点为透明色,先前打错了。
      

  3.   

    自己写代码也可以呀,不过会比较烦先把图画到CANVAS上,然后取一种颜色为透明色
    扫描CANVAS,如果上面某一点的颜色=透明色,就设为白(或其它色)
      

  4.   

    to milpas(我带着我的影子去流浪) 
      能不能说的再详细点,最好有代码
      

  5.   

    用这个函数transparentBlt函数!最后一个参数就是你要透明的颜色。其他用法和
    stretchBlt一样的。
      

  6.   

    TransparentBlt(pbox.canvas.handle,x,y,width,height,
                   img.canvsa.handle,x,y,width,height,clwhite);这样就把img上的图像画到pbox上,而且去掉了白色部分
      

  7.   

    to smhpnuaa(农奴翻身感谢党):
      我试过了,怎么没有反应?
      

  8.   

    我试了一下,将一个位图的四个角设为不同颜色,然后在中间画四个相应颜色的大矩形,设置Image为透明,结果确实是左下角对应的颜色为透明色。
      

  9.   

    to elilor(elilor):
      能不能把具体的算法贴出来?
      

  10.   

    用PhotoShop将图片转储为gif98a格式
      

  11.   

    我说的是用delphi编程实现,而不是用photoshop处理。
      

  12.   

    我说的是用delphi编程实现,不是用photoshop处理!
      

  13.   

    Procedure ConvertAndAddImages(IL: TImageList);Var
       OneImage: TBitmap;
       I: Integer;
       MaskColor: TColor;
       Name: String;
    Begin
          OneImage := TBitmap.Create;
       Try
          // it is assumed that the image height determines also the width of
          // one entry in the image list
          IL.Clear;
          IL.Height := 16;
          IL.Width := 16;
          For I := 0 To 9 Do
          Begin
             Name := 'MARK_' + IntToStr(I);
             OneImage.Handle := CreateGrayMappedRes(HInstance, PChar(Name));
             MaskColor := OneImage.Canvas.Pixels[0, 0];
             IL.AddMasked(OneImage, MaskColor);
          End;
       Finally
          OneImage.Free;
       End;
    End;