不打算用控件

解决方案 »

  1.   

    研究一下 IMAGEX
    或 GRAPHICSEX 的代码吧
      

  2.   

    图象的坐标变化应该可以用一个给出的比例从已知点推出它新点的rgb
      

  3.   

    亮度调节:
    procedure TForm1.handleClick(Sender: TObject);
    var
        p: PByteArray;
        x, y: Integer;
        Bmp: TBitmap;
    begin
        Bmp := TBitmap.Create;
        Bmp.Assign(Image1.Picture.Bitmap);
        //24位真彩色
        Bmp.PixelFormat := pf24Bit;
        randomize;
        for y := 0 to Bmp.Height - 1 do
        begin
            p := Bmp.scanline[y];
            for x := 0 to Bmp.Width - 1 do
            begin
                //每个象素点的R、G、B分量进行调节
                begin
                    p[x * 3] := Min(255, p[x * 3] + 20); //不能越界,限制在0~255
                    p[x * 3 + 1] := Min(255, p[x * 3 + 1] + 20);
                    p[x * 3 + 2] := Min(255, p[x * 3 + 2] + 20);
                end
            end;
        end;
        Image2.Picture.Bitmap.Assign(Bmp);
        Bmp.Free;
    end;
    对比度:
    procedure TForm1.handleClick(Sender: TObject);
    var
        p: PByteArray;
        x, y: Integer;
        Bmp: TBitmap;
    begin
        Bmp := TBitmap.Create;
        Bmp.Assign(Image1.Picture.Bitmap);
        Bmp.PixelFormat := pf24Bit;
        for y := 0 to Bmp.Height - 1 do
        begin
            p := Bmp.scanline[y];
            for x := 0 to Bmp.Width - 1 do
            begin
                //确定阀值为128
                if (p[x * 3] < 246) and (p[x * 3] > 128) and (p[x * 3 + 1] >
                    128)
                    and (p[x * 3 + 1] < 246)
                    and (p[x * 3 + 2] > 128) and (p[x * 3 + 2] < 246) then
                begin
                    p[x * 3] := p[x * 3] + 10;
                    p[x * 3 + 1] := p[x * 3 + 1] + 10;
                    p[x * 3 + 2] := p[x * 3 + 2] + 10;
                end;
                if (p[x * 3] > 10) and (p[x * 3] < 128) and (p[x * 3 + 1] >
                    10)
                    and (p[x *
                    3 + 1] < 128)
                    and (p[x * 3 + 2] > 10) and (p[x * 3 + 2] < 128) then
                begin
                    p[x * 3] := p[x * 3] - 10;
                    p[x * 3 + 1] := p[x * 3 + 1] - 10;
                    p[x * 3 + 2] := p[x * 3 + 2] - 10;
                end;
            end;
        end;
        Image2.Picture.Bitmap.Assign(Bmp);
        Bmp.Free;
    end;
      

  4.   

    我有一套纯图像处理的源码,可以处理大部分PS的功能,要就留个EM啦
      

  5.   

    谢谢xzhifei和楼上的几位!mail: [email protected]   [email protected]一个邮箱不保险:)
      

  6.   

    大部分PS的功能?这么牛...而且,才一个单元?这个单元不会有几十万行代码吧?我也要[email protected] [email protected]
      

  7.   

    我们平时有好多图片,也要一个 [email protected]
      

  8.   

    以前用过放大矩阵,旋转矩阵,有好东西,当然要
    [email protected]
    谢谢
    另外,很高兴看到一个和我一样抵制日货的
      

  9.   

    我也要啊@ [email protected]
      

  10.   

    我要呀,谁给传一个,谢谢了[email protected]
      

  11.   

    给我也发个吧,谢谢 [email protected]
      

  12.   

    我也正在编写一个图象处理软件,麻烦帮忙给我发一个,谢谢
    [email protected]
      

  13.   

    宝物!还有没?!各位还有这份收藏的,劳烦发给我一份啊![email protected]