| To: | REALbasic NUG German <realbasic-nug dot de at lists dot realsoftware dot com> |
|---|---|
| Subject: | RB2k5: Speichern des Inhaltes eines ImageWell mittels SaveAsJpeg |
| From: | Sascha Schneppmueller <schneppmueller at gmail dot com> |
| Date: | Fri, 24 Jun 2005 13:29:50 +0200 |
| Delivered-to: | realbasic-nug dot de at lists dot realsoftware dot com |
| Domainkey-signature: | a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=T8UpxMe7Qz+I4bcG6yCjzmTP55MS2C7+1CfcANBGHfnnFAn5axz8rwzaGMsR3s8Jx72ajmRLjMZ5gGZIlkof26HYvoWdsRCwsh/alMyjrz+q/MCqCa3/ig49hIY70lCGgBdMeln8nvqXU9VAKNYmMY3t5aeqvaUX3JWEVAk7scA= |
Hallo REALbasic NUG German
Ich habe ein ImageWell erstellt in welches ich mittels Drag&Drop ein
845x1200 Pixel (72dpi) grosses Bild lege.
Im DropObject Event des ImageWell's ist folgender Code:
Dim ReSized as Picture
Dim h,w As Integer
If Obj.PictureAvailable Then
h = obj.Picture.Height
w = obj.Picture.Width
ReSized = NewPicture(w, h,32)
ReSized.Graphics.DrawPicture (obj.Picture, 0, 0, 176, 220, 0, 0, w, h)
Me.Image = ReSized
Me.Refresh
Elseif Obj.FolderItemAvailable Then
h = obj.FolderItem.OpenAsPicture.Height
w = obj.FolderItem.OpenAsPicture.Width
ReSized = NewPicture(w, h,32)
ReSized.Graphics.DrawPicture (obj.FolderItem.OpenAsPicture, 0, 0,
176, 220, 0, 0, w, h)
Me.Image = ReSized
Me.Refresh
End If
Wenn ich nun das Bild mittels folgendem Code:
Dim f As New FolderItem
f = GetSaveFolderItem("Image/JPEG","Wallpaper.jpg")
If f <> NIL Then
f.SaveAsJPEG(Wallpaper.Image)
End If
In eine Datei speichere ist es wieder 845x1200 Pixel gross.
Doch ich möchte das Bild gerne als 176x220 Pixel grosses Bild sichern.
Das ist übrigends auch die genaue Größe des ImageWell's.
Was mache ich falsch?
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Was bedeutet incl. 18Mon Updates, Sascha Schneppmueller |
|---|---|
| Next by Date: | Re: RB2k5: Speichern des Inhaltes eines ImageWell mittels SaveAsJpeg, Sascha Schneppmueller |
| Previous by Thread: | Was bedeutet incl. 18Mon Updates, Claudius Sailer |
| Next by Thread: | Re: RB2k5: Speichern des Inhaltes eines ImageWell mittels SaveAsJpeg, Sascha Schneppmueller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |