Autor Beitrag
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Fr 03.11.06 21:50 
Wenn ich ein JPEG-Foto in ein TImage lade, wird es dann automatisch in eine Bitmap umgewandelt? Muss ja, sonst könnte ich ja nicht auf Image1.Picture.Bitmap zugreifen. :gruebel:

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Fr 03.11.06 22:13 
Warum ergibt
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
 if (radiobutton1.checked) then
 begin
      Image1.Picture.Bitmap.Width := 190;
      Image1.Picture.Bitmap.Height := 237;
 end;

am Ende eine weiße Fläche? :gruebel:

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
turboPASCAL
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 193
Erhaltene Danke: 1

Win XP / Vischda
D6 PE / D2005 PE
BeitragVerfasst: Sa 04.11.06 07:12 
user profile iconMarco D. hat folgendes geschrieben:
Wenn ich ein JPEG-Foto in ein TImage lade, wird es dann automatisch in eine Bitmap umgewandelt?

Nein.

Das Bitmap was du siehst ist leer (die Weisse Fläche halt).


Wenn du das JPEG als Bitmap brauchst kannst du es einfach mit folgender Procedure "umwandeln":
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
procedure ConvertImageToBitmap(Image: TImage);
var TmpPic: TPicture;
begin
  TmpPic := TPicture.Create;
  try
    TmpPic.Bitmap.Assign(Image.Picture.Graphic);
    Image.Picture.Bitmap.Assign(TmpPic.Bitmap);
  finally
    TmpPic.Free; // (Edit:) FreeAndNil(TmpPic); währe wohl besser...
  end;
end;
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Sa 04.11.06 12:27 
Danke es klappt.

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot