AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Multimedia Delphi Gif bei verkleinerter Bildauflösung farblich stark veränder
Thema durchsuchen
Ansicht
Themen-Optionen

Gif bei verkleinerter Bildauflösung farblich stark veränder

Ein Thema von Hallo_Thomas · begonnen am 13. Sep 2005 · letzter Beitrag vom 25. Sep 2005
Antwort Antwort
Hallo_Thomas

Registriert seit: 18. Apr 2005
Ort: Dresden
405 Beiträge
 
Delphi 2005 Professional
 
#1

Re: Gif bei verkleinerter Bildauflösung farblich stark verä

  Alt 13. Sep 2005, 22:01
Irgendwie versag ich hier schon beim einfachsten, TBitmap32, undefinierter begriff.


Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, GR32_Image;

type

  TForm1 = class(TForm)
    Image321: TImage32;
     procedure CromaKey(ABitmap: TBitmap32; TrColor: TColor32);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure CromaKey(ABitmap: TBitmap32; TrColor: TColor32);
var
  P: PColor32;
  C: TColor32;
  I: Integer;
begin
  TrColor := TrColor and $00FFFFFF; // erase alpha, (just in case it has some)
  with ABitmap do
  begin
    P := PixelPtr[0, 0];
    for I := 0 to Width * Height - 1 do
    begin
      C := P^ and $00FFFFFF; // get RGB without alpha
      if C = TrColor then // is this pixel "transparent"?
        P^ := C; // write RGB with "transparent" alpha back into the SrcBitmap
      Inc(P); // proceed to the next pixel
    end;
  end;
end;

end.
Angehängte Dateien
Dateityp: zip gr32_143.zip (291,5 KB, 8x aufgerufen)
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:21 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz