Autor Beitrag
Quivadis
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 314

UBUNTU 9.04
D2005 PERS, JAVA, D7 Pers.
BeitragVerfasst: Do 23.06.05 10:02 
Hallo Freunde,

habe wider mal eine Frage.

Wie kann man ein JPG-Bild, das kein 4:3 ist, im Speicher nach 4:3 umrechnen lassen.
Wenn Bild schon 4:3 ist darf nix mehr passieren.

Das ich über ein Speicherbitmap gehen muss, ist mir klar. Nur existiert dort keine Stretch funktion die ich nutzen könnte.
Habe Bild als JPG im Speicher nun komme ich nicht weiter

mfG

Quivadis


Moderiert von user profile iconGausi: Topic aus VCL (Visual Component Library) verschoben am Do 23.06.2005 um 16:09

_________________
Wissen ist macht, nichts wissen macht auch nichts. ODER: Wer nichts weis, kann nichts vergessen.
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Do 23.06.05 10:06 
JPG-->BMP.
Dort dann Windows.StretchBlt aufrufen und in ein zweites BMP kopieren. Dass dann BMP-->JPG.
HTH.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Quivadis Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 314

UBUNTU 9.04
D2005 PERS, JAVA, D7 Pers.
BeitragVerfasst: Do 23.06.05 10:12 
ist bei dir
ausblenden Delphi-Quelltext
1:
2:
jpeg             : TJPEGImage
bmp              : TBitmap;
?


Da finde ich wie gesagt keine stretch-funktion.

Angezeigt wird erst es später und zwar gezoomt, diese funktion habe ich schon fertig.
Ich benötige aber vorher ein jpg in 4:3.

_________________
Wissen ist macht, nichts wissen macht auch nichts. ODER: Wer nichts weis, kann nichts vergessen.
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Do 23.06.05 10:15 
Jup. Ist der Fall.

Man beachte aber bitte, dass ich Windows.StretchBlt geschrieben habe, d.h. den GDI-Funktionsaufruf explizit genannt hab. An diesen musst Du die Handles der beiden TBitmap.Canvas-Objekte übergeben. Doku zu StretchBlt gibt's in der Win32 Doku, die deiner Delphi-Version beiliegt oder im MSDN.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Quivadis Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 314

UBUNTU 9.04
D2005 PERS, JAVA, D7 Pers.
BeitragVerfasst: Do 23.06.05 10:27 
Über vcl geht das nicht. Programm soll später mal nach .net, deswegen will ich eigentlich keine win-api aufrufe drin haben die nicht wirklich nötig sind.

sonst mache ich es halt doch aber ein timage, nur das ich es nicht anzeigen lasse.

Ich spiele mal weiter rum. Mit GDI habe ich leider noch so gut wie nicht gearbeitet.

Danke Dir für deine Tipps.

_________________
Wissen ist macht, nichts wissen macht auch nichts. ODER: Wer nichts weis, kann nichts vergessen.
Quivadis Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 314

UBUNTU 9.04
D2005 PERS, JAVA, D7 Pers.
BeitragVerfasst: Do 23.06.05 11:20 
So bin jetzt soweit das ich doch gdi nehme.

Habe jetzt aber ein Problem wie ich das handle angeben muss.

_________________
Wissen ist macht, nichts wissen macht auch nichts. ODER: Wer nichts weis, kann nichts vergessen.
Quivadis Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 314

UBUNTU 9.04
D2005 PERS, JAVA, D7 Pers.
BeitragVerfasst: Do 23.06.05 11:47 
habe das jetzt über bitmap.canvaws.stretchdrwaw gelöst.

_________________
Wissen ist macht, nichts wissen macht auch nichts. ODER: Wer nichts weis, kann nichts vergessen.