Delphi-PRAXiS
Seite 1 von 4  1 23     Letzte »    

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Algorithmen, Datenstrukturen und Klassendesign (https://www.delphipraxis.net/78-algorithmen-datenstrukturen-und-klassendesign/)
-   -   Delphi Grafik im Speicher erstellen für BlobStream (DB) (https://www.delphipraxis.net/207654-grafik-im-speicher-erstellen-fuer-blobstream-db.html)

NoGAD 19. Apr 2021 20:46

Grafik im Speicher erstellen für BlobStream (DB)
 
Hallo,


Welches Control würde man wohl am ehesten nutzen, um eine Zufallsgrafik im Speicher zu erstellen, welche als Stream für ein Datenbankfeld durchgereicht werden soll?

Zufallsgrafik heißt für mich, dass ich einfach auf ein 50x50 großes Bitmap ein paar Punkte oder Text zeichnen möchte.

LG Mathias

KodeZwerg 19. Apr 2021 21:14

AW: Grafik im Speicher erstellen für BlobStream (DB)
 
Zitat:

Zitat von NoGAD (Beitrag 1487421)
Bitmap

genau das :-]

NoGAD 19. Apr 2021 21:15

AW: Grafik im Speicher erstellen für BlobStream (DB)
 
Das eigenartige ist, mein Delphi erkennt TBitMap nicht mehr.

Fehlt mir eine unit?

LG Mathias

KodeZwerg 19. Apr 2021 21:18

AW: Grafik im Speicher erstellen für BlobStream (DB)
 
Zitat:

Zitat von NoGAD (Beitrag 1487424)
Fehlt mir eine unit?

Vcl.Graphics bzw FMX.Graphics
(ein klick auf einen link führt dich direkt zur TBitmap Referenz)

Nachwort:
Wenn Du ein Control suchst, nutze ein TImage, das ist sichtbar. TBitmap ist kein Control, es ist ein Objekt.

Delphi-Quellcode:
var
  bmp: TBitmap;
begin
  bmp := TBitmap.Create usw usf

NoGAD 19. Apr 2021 21:30

AW: Grafik im Speicher erstellen für BlobStream (DB)
 
Danke, hat nix gebracht.

Ich habe als unit noch

Vcl.Imaging.GIFImg,
Vcl.Imaging.jpeg,
Vcl.Imaging.pngimage

drin. Hakt sich da was mit TBitMap?

LG

NoGAD 19. Apr 2021 21:32

AW: Grafik im Speicher erstellen für BlobStream (DB)
 
Zitat:

Zitat von KodeZwerg (Beitrag 1487426)
Nachwort:
Wenn Du ein Control suchst, nutze ein TImage, das ist sichtbar. TBitmap ist kein Control, es ist ein Objekt.

Ja, ich meinte ein Objekt. Es muss nicht sichtbar sein, ich benötige nur Zufallsgrafiken (50x50 z.B.).

LG

KodeZwerg 19. Apr 2021 21:32

AW: Grafik im Speicher erstellen für BlobStream (DB)
 
Hab Antwort geupdated, hilft das?

KodeZwerg 19. Apr 2021 21:38

AW: Grafik im Speicher erstellen für BlobStream (DB)
 
Dann halt mit vollem Namen. Das muss funktionieren.
Delphi-Quellcode:
procedure TForm9.FormCreate(Sender: TObject);
var
  bmp: Vcl.Graphics.TBitmap;
begin
  bmp := Vcl.Graphics.TBitmap.Create;
  try
    bmp.Width := 50;
    bmp.Height := 50;
    // mach was mit dem objekt
  finally
    bmp.Free
  end;
end;

NoGAD 19. Apr 2021 21:48

AW: Grafik im Speicher erstellen für BlobStream (DB)
 
Jetzt habe ich auch eine aussagekräftige Fehlermeldung:


[dcc32 Fehler] Unit_Hauptformular.pas(1390): E2010 Inkompatible Typen: 'tagBITMAP' und 'TBitmap'

var
Dummy_Image: TBitmap;
begin
Dummy_Image := Vcl.Graphics.TBitmap.Create;


Was ist bitte tagBITMAP?

LG


Edit: https://www.delphipraxis.net/192782-...verwendet.html dort war die Lösung versteckt :roll:

KodeZwerg 19. Apr 2021 21:50

AW: Grafik im Speicher erstellen für BlobStream (DB)
 
Nutze auch im var den vollen namen.
tagBITMAP ist in Windows definiert. da beißt sich was.

also es gibt auch winapi.windows.tbitmap <<< deswegen


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:23 Uhr.
Seite 1 von 4  1 23     Letzte »    

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz