-=-
.
.....
  
 
RSS
Direkomendasikan menggunakan brower Opera/Chrome/Firefox. Resolusi minimal 1024x768 | Powered by ____ |
 
  
 
Nikmati Delphi-ID dalam berbagai versi tampilan :
Basic View (LOW Bandwidth)
Default View (Full)
Mobile Edition
Main Menu
..:: onWebTools ::..
..:: onLastPosts ::..
goto Postjumlah komponen maksimal dalam sebuah project(6)
 by d4mnf1y32
 on 21.May at 12:16
goto Posttanya grayscale to biner dengan scanline(1)
 by luckynvic
 on 20.May at 20:44
goto Posttanya looping biner to matriks(1)
 by luckynvic
 on 20.May at 20:10
goto Postsql error:acces denied for user....(2)
 by nasbms
 on 19.May at 16:54
goto Postpemanggilan frame(4)
 by nasbms
 on 19.May at 16:14
goto Posttanya AvLock(0)
 by azuriza
 on 19.May at 11:24
goto PostGet TDBEdit Value Menggunakan LookUp Grid(10)
 by henry_sys
 on 18.May at 11:27
goto Postmenghitung record dalam perulangan(4)
 by idhiel
 on 16.May at 13:53
goto Posttanya ascii(4)
 by mas_kofa
 on 16.May at 12:11
goto PostRawPrint Untuk Delphi XE2(0)
 by adewijaya
 on 15.May at 22:34
goto Postdatabase error..(4)
 by idhiel
 on 15.May at 15:57
goto Postbekasi, pt arila putra mahkota(3)
 by mas_kofa
 on 15.May at 15:37
goto Postbagaimana cara membaca file *.doc dg delphi?(0)
 by ficky
 on 15.May at 06:14
goto Posttanya biner to matriks(13)
 by diandewi
 on 14.May at 20:30

..:: onLast Articles ::..
..:: New Download ::..
Pascal-id.Org
Feeds -  Popular -  Latest
RE: The Longue
8 months, 3 weeks ago
RE: belajar pascal
8 months, 3 weeks ago
RE: The Longue
8 months, 3 weeks ago
RE: belajar pascal
8 months, 3 weeks ago
RE: Perkenalan dan Absen
8 months, 3 weeks ago
RE: Alhamdulillah Buka Puasa Bersama
8 months, 4 weeks ago
RE: تَقَبَّلَ اللهُ مِنَّا وَمِنْكَ - Selamat Hari Raya Idul Fitri
8 months, 4 weeks ago
Lintas Situs
«
free web site stats and visitor tracking

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
sulth4nOffline
Location:
Post subject: resize image  PostPosted: 07/Mar/2006 15:20
onIntermediate


Joined: 30-Nov-2005
Posts: 46

Status: Offline
mas2 semua yang baek2
aku mau nanya ni....
gimana cara merize image dari delphi program?
maksudnya begini
1. program menghitung ukuran panjang dan lebar monitor...
2. terus menghitung ukuran panjang dan lebar gambar
3. panjang dan lebar gambar dibandingkan lebar monitor
4. kalau sama ...biarin aja
5. kalau beda ukuran panjang dan lebar gambar disesuaikan atau disamakan dengan ukuran panjang dan lebar monitor..

nah yang jadi masalah aku ga tahu cara meresize ukuran panjang dan lebar ini(langkah ke 5)...
mohon petunjuk....
oya satu lagi...
bisa ga...delphi mengubah type dari sebuah file gambar
*.jpg -> *.bmp

sekali lagi mohon petunjuk

tengkyu buat semua yah...
 
 View user's profile Send private message  
Reply with quote Back to top
saysansay
Location:
Post subject:   PostPosted: 07/Mar/2006 18:29
onProfessional


Joined: 06-Aug-2005
Posts: 648

      Quote:
bisa ga...delphi mengubah type dari sebuah file gambar
*.jpg -> *.bmp
Apa sech Yang nga Wakakkaakakakakak

code : pascal
  1. function JPGToBMp(var BMPpic, JPGpic: string):boolean;
  2. var
  3. Bitmap: TBitmap;
  4. JpegImg: TJpegImage;
  5. begin
  6. Result:=False;
  7. JpegImg := TJpegImage.Create;
  8. try
  9. JpegImg.LoadFromFile(JPGpic) ;
  10. Bitmap := TBitmap.Create;
  11. try
  12. Bitmap.Assign(JpegImg) ;
  13. JpegImg.SaveToFile(BMPpic) ;
  14. Result:=True;
  15. finally
  16. Bitmap.Free
  17. end;
  18. finally
  19. JpeImg.Free
  20. end;
  21. end;
Parsed in 0.006 seconds, using GeSHi


Never Give Erorr OK
Kapan Ya Pak Yusya Selesai Entri Data Rolling Eyes

_________________
== Barudak Jambi ===
Company : http://www.mpiholding.com/
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
ZeALOffline
Location:
Post subject:   PostPosted: 08/Mar/2006 09:32
onProfessional


Joined: 07-Apr-2005
Posts: 763

Status: Offline
Kalo merisize gambar udah pernah dibahas.. coba disearch lagi...

_________________
do i know you?

[ My Blog : http://www.monyetpinter.com ] [ My RPG Project : http://einarc.wordpress.com ] [ FJBex : http://www.fjbex.com ]
 
 View user's profile Send private message  
Reply with quote Back to top
sulth4nOffline
Location:
Post subject:   PostPosted: 11/Mar/2006 13:02
onIntermediate


Joined: 30-Nov-2005
Posts: 46

Status: Offline
mas zeal aku dah search
keywordnya : image,gambar,ukuran, resize tapi kok ga da
mungkin mas zeal bisa bantu ngasi keywordnya??
 
 View user's profile Send private message  
Reply with quote Back to top
ZeALOffline
Location:
Post subject:   PostPosted: 13/Mar/2006 09:37
onProfessional


Joined: 07-Apr-2005
Posts: 763

Status: Offline
ini dia... keywordnya "resize" : http://www.delphi-id.org/dpr/PNphpBB2-v ... resize.pas

_________________
do i know you?

[ My Blog : http://www.monyetpinter.com ] [ My RPG Project : http://einarc.wordpress.com ] [ FJBex : http://www.fjbex.com ]
 
 View user's profile Send private message  
Reply with quote Back to top
sulth4nOffline
Location:
Post subject:   PostPosted: 13/Mar/2006 16:26
onIntermediate


Joined: 30-Nov-2005
Posts: 46

Status: Offline
mas aku dah nyoba,..
cuma dengan cara yang sedikit berbeda
tapi malah ga jalan
tolong dilihat apa yang salah dengan kode ini
code : pascal
  1. procedure TForm1.FormCreate(Sender: TObject);
  2. begin
  3. WindowState:=wsMaximized;
  4. backgroundImage := TBitmap.Create;
  5. backgroundImage.LoadFromFile(ExtractFilePath(Application.ExeName) 'background.bmp');
  6. backgroundImage.Height := Screen.Height;
  7. backgroundImage.Width := Screen.Width;
  8. end;
Parsed in 0.004 seconds, using GeSHi


harusnya dengan kode di atas kan ukuran image nya berubah ngikut ukuran monitor saya tapi ketika gambar itu saya gunakan pada kode berikut ini malah dia tetap dengan ukuran nya semula tanpa perubahan
code : pascal
  1. procedure TForm1.FormPaint(Sender: TObject);
  2. begin
  3. Canvas.Draw(0, 0, backgroundImage);
  4. end;
Parsed in 0.002 seconds, using GeSHi


kira2 apa yang salah ya dengan kode saya..
apa algoritma saya masi salah
mohon pencerahan
 
 View user's profile Send private message  
Reply with quote Back to top
ZeALOffline
Location:
Post subject:   PostPosted: 14/Mar/2006 08:50
onProfessional


Joined: 07-Apr-2005
Posts: 763

Status: Offline
Sebenernya kalo cuma mo ditampilin aja tanpa perlu merubah file, cukup set propertiesnya aja...
Misalnya pake komponen TImage, cukup set properties Stretch = true, proportional = true (kalo mo gak "ketarik" gambarnya), hmm... trus apa lagi yah.. lupa.. oia, Kalo pengen ditampilin keseluruh form, TImagenya tambahin properties...duh... apa yah.. lupa.. pokoknya ada pilihan "allClient"..
cari aja lah.. pokoknya urutan paling atas di properties (berdasarkan alphabet).. Razz

_________________
do i know you?

[ My Blog : http://www.monyetpinter.com ] [ My RPG Project : http://einarc.wordpress.com ] [ FJBex : http://www.fjbex.com ]
 
 View user's profile Send private message  
Reply with quote Back to top
sulth4nOffline
Location:
Post subject:   PostPosted: 14/Mar/2006 11:10
onIntermediate


Joined: 30-Nov-2005
Posts: 46

Status: Offline
maksudnya property alignnya ya? di set ke allclient..
ooo
mas zeal ada satuu pertanyaan terakhir..
ga cuma buat mas zeal aja buat siapa aja dech yang bisa
gimana caranya aku tahu ektensi sebuah file yang aku buka
pake Topenpicturedialog apa gif,bmp,atau jpg atau lain2
makasi..
 
 View user's profile Send private message  
Reply with quote Back to top
sulth4nOffline
Location:
Post subject:   PostPosted: 14/Mar/2006 11:33
onIntermediate


Joined: 30-Nov-2005
Posts: 46

Status: Offline
oya mas..
aku pake komponen tbtmap mas...
aku dah nyoba nyar property align...tapi gada...
 
 View user's profile Send private message  
Reply with quote Back to top
ZeALOffline
Location:
Post subject:   PostPosted: 14/Mar/2006 15:44
onProfessional


Joined: 07-Apr-2005
Posts: 763

Status: Offline
err... kalo cuma mo sekedar tau ekstensi bisa pake fungsi
ExtractFileExt( 'NamaFile.ext' );
Lagipula kalo pake OpenPictureDialog kan bisa pake filter.. misalnya cuma nampilin bmp aja atau jpg aja.. gitchu..

Err... TBitmap itu bukan komponen kan yah.. ???
Nampilinnya pake komponen apa? atau langsung ke canvas yah?
Kenapa gak pake TImage aja...??

** kok malah jadi gue yang nanya.... ** Razz

      Code:

procedure BukaAhUh;
begin

 if OpenPictureDialog.execute then
 begin

  showmessage(' Extensi file ini adalah : ' + ExtractFileExt(OpenPictureDialog.FileName));
 
  Image1.picture.LoadFromFile(OpenPictureDialog.FileName);

 end;

end;


Gak tau dah caranya kalo pake TBitmap...

_________________
do i know you?

[ My Blog : http://www.monyetpinter.com ] [ My RPG Project : http://einarc.wordpress.com ] [ FJBex : http://www.fjbex.com ]
 
 View user's profile Send private message  
Reply with quote Back to top
sulth4nOffline
Location:
Post subject:   PostPosted: 15/Mar/2006 15:44
onIntermediate


Joined: 30-Nov-2005
Posts: 46

Status: Offline
saya udah pake variabel img yang bertype TImage di bagian private.
kemudian di event oncreate pada form1 saya bikin
img := TImage.create(self);
img.picture.loadfromfile(blah2);

terus align:= alclient;

tapi waktu pake dengan
canvas.draw(blah2);
tetap aja ga mau membesar.
tapi malah ikut ukuran file semula

kira2 ada ide ga?
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic





Powered by PNphpBB2 © 2003-2009 The Zafenio Team
Credits


| Register | Lost Password ? |