Autor Beitrag
Hack Gott
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 409

Windows Vista
Delphi 2005 Personal, Delphi 7
BeitragVerfasst: Mi 06.04.05 11:07 
Ich wollte gerne eine Image vergrößern lassen, dass heißt ich lade eine Image aus einer Datei (der User kann es mit einem opendialog laden) und auf einen Buttonklick wird die Image vergrößert und auf einen anderen verkleinert. Die Eigenschaft Zoom oder irgendwas ähnliches hab ich leider nicht gefunden.
Lossy eX
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1048
Erhaltene Danke: 4



BeitragVerfasst: Mi 06.04.05 11:16 
Bei einem TImage solltest du dir mal die Eigenschaften Stretch, Proportional und Center anschauen.

Ein andere Weg bei Zeichnen wäre Canvas.StretchDraw.

_________________
Nur die Menschheit ist arrogant genug, um zu glauben sie sei die einzige intelligente Lebensform im All. Wo nicht mal das nachhaltig bewiesen wurde.
ScorpionKing
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1150

Win XP

BeitragVerfasst: Mi 06.04.05 11:40 
hier mal ein beispiel:

ausblenden Delphi-Quelltext
1:
2:
3:
Image1.Width := 1024;
Image1.Height := 768;
Image1.Stretch := true;


das bringt das image z.B. auf die größe 1024x768!

MfG, ScorpionKing!

_________________
Aus dem Urlaub zurück!
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 06.04.05 11:49 
Wenn du die Jedi Komponenten hast, kannst du dir das in meinem Miniprojekt mal ansehen.
//EDIT: Dateianhang korrigiert. War noch eine rxLib-Komponente enthalten und es fehlte eine Unit. Sorry.
Einloggen, um Attachments anzusehen!


Zuletzt bearbeitet von jasocul am Mi 06.04.05 15:33, insgesamt 1-mal bearbeitet
Popov
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1655
Erhaltene Danke: 13

WinXP Prof.
Bei Kleinigkeiten D3Pro, bei größeren Sachen D6Pro oder D7
BeitragVerfasst: Mi 06.04.05 13:49 
Ich hab dir schnell ein Beispiel ohne Jedi geschrieben. Das Ganze funktioniert so, daß du das Bild zuerst in eine Bitmap lädst und sie dort als das Original bleibt. Bei Zoomen wird von dieser Bitmap dann in die Image Komponente gestretcht.
Einloggen, um Attachments anzusehen!
_________________
Popov
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 06.04.05 14:16 
@Popov:
Ich war nur zu faul, mein Programm umzuschreiben. Die Routine zum Zoomen ist aber auch mit drin.
Hack Gott Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 409

Windows Vista
Delphi 2005 Personal, Delphi 7
BeitragVerfasst: Mi 06.04.05 14:52 
Titel: Gut!
So, jetzt kann ich eine Bitmap beliebig vergrößern (auch icon, usw.), aber jetzt habe ich ein weiteres Problem:
Ich will das die Bitmap größer wird, um so näher man kommt. Vergleichsweise ist der Mac Dok.
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 06.04.05 14:54 
Wenn du näher an den Bildschirm gehst, wird es doch größer! :lol:
Bei meiner Zoom-Funktion geht das. Schau dir einfach den Source an. Sind an der Stelle iirc nur 10 Zeilen. Allerdings undokumentiert.
Hack Gott Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 409

Windows Vista
Delphi 2005 Personal, Delphi 7
BeitragVerfasst: Mi 06.04.05 15:06 
user profile iconjasocul hat folgendes geschrieben:
Wenn du näher an den Bildschirm gehst, wird es doch größer! :lol:
Bei meiner Zoom-Funktion geht das. Schau dir einfach den Source an. Sind an der Stelle iirc nur 10 Zeilen. Allerdings undokumentiert.


Welche Jedi Version soll ich mir den holen?
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 06.04.05 15:10 
Einfach die aktuelle Version.
Hack Gott Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 409

Windows Vista
Delphi 2005 Personal, Delphi 7
BeitragVerfasst: Mi 06.04.05 15:14 
Hmm, eigentlich wollte ich das irgendwie mit der Cursor entfernung von der Bitmap machen, kann man irgendwie die aktuelle Position des Cursors kriegen (am besten als integer)? Das würde mir schon reichen.
Popov
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1655
Erhaltene Danke: 13

WinXP Prof.
Bei Kleinigkeiten D3Pro, bei größeren Sachen D6Pro oder D7
BeitragVerfasst: Mi 06.04.05 16:29 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
var
  p: TPoint;
begin
  GetCursorPos(p)

  x := p.x;
  y := p.y;


//EDIT:

Habe gerade deine BS Angaben gesehen: "WIN XP PRO, WIN XP HOME, WIN NT, WIN ME, WIN 95, Linux, WIN 97, WIN 2000". Hast du die alle gekauft oder illegal erworben? Wenn die illegal sind, was eigentlich wahrscheinlich ist, weil sich kein Mensch alle diese Versionen kauft, dann machst du es einem sehr leicht dich bei Microsoft anzuschwärzen. Das mach paar Tausend Euro Strafe für dich. Es gibt Leute, die sind wirklich zu bescheiert und prallen auch noch mit der geklauten Software. :?

_________________
Popov
Hack Gott Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 409

Windows Vista
Delphi 2005 Personal, Delphi 7
BeitragVerfasst: Mi 06.04.05 17:58 
Ich hab die nicht geklaut (oder illegal erworben)!
WIN XP PRO --> War bei meinem Laptob dabei (4.PC // 1. Laptob
WIN XP HOME --> War bei meinem PC dabei (3.PC)
WIN NT --> Hab ich auf dem Speicher gefunden
WIN ME --> War auf meinem 2. PC
WIN 95 --> War auf meinem 1. PC (damit hab ich angefangen)
Linux --> ist kostenlos
WIN 97 --> Geschenckt bekommen
WIN 2000 --> Schülerlizenz von der Schule
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Mi 06.04.05 18:40 
user profile iconHack Gott hat folgendes geschrieben:
WIN 97 --> Geschenckt bekommen

Gibts gar nicht :P

Rest bitte per PN, danke.

raziel

_________________
JSXGraph