Autor Beitrag
guido
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22

ME
Delphi 3 / 5
BeitragVerfasst: Mo 20.03.06 14:09 
Hallo,

habe folgendes Problem:
Ich lade mr "irgendein BMP" mit "Irgendeiner Grösse" in ein TImage mit 50x50 Pixel wo Autostretch auf True steht. Ich hoffte das sich das Bitmap dann "automatisch runterrechnente" .
Mit einer Schleife "Punkt für Punkt", "Zeile für Zeile" wollte ich dann die RGB Werte mit GetrValue,GetGValue,GetBValue in ein eigenes Objekt schreiben. Das Objekt zeichnete ich dann in ein neues Image und siehe da: Die Punkte die ich auch dem "Verkleinertem" Image geholt habe waren nur ein paar % der oberen linken Ecke des Originalbildes. Es wird also nur verkleinert dargestellt, aber nicht wirklich geändert.

Wofür braucht man ein 50x50 Pixel Bil fragen sich vieleicht manch ??
Rasterscanning bei Lasershows . . .ein Hobby von mir was mich zum Proggen zwang . .

Hoffe irgendjemand versteht mein Problem und kann mir helfen.

Gruss und Danke im Vorraus..
Guido
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mo 20.03.06 14:15 
Hilft es, wenn du die Abfrage der Pixel über Image1.Canvas.Pixels anstatt Image1.Picture.Bitmap.Canvas.Pixels laufen lässt?

_________________
We are, we were and will not be.
guido Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22

ME
Delphi 3 / 5
BeitragVerfasst: Mo 20.03.06 15:02 
Titel: BMP
Hallo,

derzeit benutze ich image1.canvas.pixel[x,y] .
Das andere meine ich aber auch schon probiert zu haben.
Hab auch schon mal nach einem Ersatz der Image-Komponente gesucht, leider erfolglos.

Gruss
Guido
frank-wob
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 20.03.06 15:26 
Hallo,

mit den Graphics32 Komponenten kannst du das Bild skalieren und auch korrekt auf die Bildpunkte zugreifen.

Gruß Frank
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Mo 20.03.06 15:38 
lade das große Bild und verkleiner es dann selbst mit hilfe von Suche im MSDN STRETCHBLT
dann geht das mit Canvas.Pixels auch

_________________
wer andern eine grube gräbt hat ein grubengrabgerät
- oder einfach zu viel zeit
Zyklame
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 41
Erhaltene Danke: 1

Win 7 Professional
Delphi XE, Visual Studio 2010
BeitragVerfasst: Mo 20.03.06 15:43 
Ich glaube "stretchblt" könnte funktionieren (hoffe der Befehl heißt so)

edit:
hopla etwas spät gesendet

den Befehl hätte ich dir auch empfolen