Arsip: file gambar ?
more 17 years ago
dekos
Mau nanya nich ? Gemana yach caranya kita nerjemahin file gambar, misal jenis bmp, sehingga kita bisa tahu lebar gambar serta data dari tiap pixel..... nuhun :idea: :?:
more 17 years ago
cikumiyu
Coba buka link ini siapa tau bisa membantu:
http://cikumiyu.multiply.com/journal/item/5/Grayscale_Bitmap_Selector
more 17 years ago
yadi
Mudah2n bisa membantu….
Create New Form lagi dengan properties formstyle fsMDIChild lagi sebagai tempat menampilkan citra dan tempatkan Komponen TImage,…dan komponen StatusBar untuk menampilkan Informasi image….
Kalau di listing bawah ini nama formnya Formcitra….
udah pernah saya cobain, kebetulan ada referensi juga,….
procedure TFormUtama.ButtonAmbilCitraClick(Sender: TObject);
var
fc: string;
begin
if (OpenPictureDialog.Execute) then
begin
if (FormCitra = nil) then
Application.CreateForm(TFormCitra, FormCitra);
FormCitra.Image.Picture.LoadFromFile(
OpenPictureDialog.FileName);
FormCitra.ClientHeight := FormCitra.Image.Picture.Height;
FormCitra.ClientWidth := FormCitra.Image.Picture.Width;
FormCitra.ClientHeight := FormCitra.Image.Picture.Height;
case (FormCitra.Image.Picture.Bitmap.PixelFormat) of
pf1bit : fc := 'biner';
pf8bit : fc := 'keabuan';
pf24bit : fc := 'true color';
end;
StatusBar.SimpleText := OpenPictureDialog.FileName
+ ' (' + IntToStr(FormCitra.Image.Picture.Width)
+ 'x' + IntToStr(FormCitra.Image.Picture.Height)
+ ', ' + fc + '';
end;
end;
end.
ini juga fungsi untuk baca nilai pixel image tapi yang grayscale (keabuan)…
yang True Color (RGB) belum pernah coba.
Kalo fungsi baca nilai pixel ini saya tempatkan di unit yang baru,.Tapi deklarasikan dulu (type Pmatrik = Array Of Array Of Real) di unit Form Utamanya…
unit UnitBacaImage;
interface
uses Unit1,Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, ComCtrls, Buttons, StdCtrls, ExtDlgs;
Function BacaImage(x :Timage): Pmatrik;
implementation
Function BacaImage(x :Timage): Pmatrik;
var
h,w,i,j : integer;
grey : PMatrik;
PH :PbyteArray;
begin
h := x.Picture.Height;
w := x.Picture.Width;
setlength(grey,h,w);
for i:= 0 to h - 1 do
begin
PH := x.Picture.Bitmap.ScanLine[i];
for j:= 0 to w - 1 do
begin
grey[i,j]:= PH[j];
End;
End;
BacaImage := Grey;
end;
end.
more 17 years ago
dekos
Alah Nuhun pisan....., tapi ada lagi nih focusnya kita pengen baca langsung data dari file gambar tanpa nampilin dulu citra di layar???? Please...
more 17 years ago
pebbie
lha sama aja, loadnya pake TBitmap dan variannya. nggak usah dimasukin TImage atau digambar di Paintbox..
klo mo baca langsung bytestreamnya cari aja formatnya di wotsit
more ...
- Pages:
- 1
reply |
Report Obsolete
Last Articles
Last Topic
- PascalTalk #6: (Podcast) Kuliah IT di luar negeri, susah gak sih?
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #5: UX: Research, Design and Engineer
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #4: Obrolan Ringan Seputar IT
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #2: Membuat Sendiri SMART HOME
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #3: RADically Fast and Easy Mobile Apps Development with Delphi
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #1: Pemanfaatan Artificial Intelligence di Masa Covid-19
by LuriDarmawan in Tutorial & Community Project more 4 years ago - Tempat Latihan Posting
by LuriDarmawan in OOT more 5 years ago - Archive
- Looping lagi...
by idhiel in Hal umum tentang Pascal Indonesia more 12 years ago - [ask] koneksi ke ODBC user Dsn saat runtime dengan ado
by halimanh in FireBird more 12 years ago - Validasi menggunakan data tanggal
by mas_kofa in Hal umum tentang Pascal Indonesia more 12 years ago
Random Topic
- Case Sensitive
by galih in Tip n Trik Pemrograman more 17 years ago - Seagate Crystal Report
by tubbies in Reporting more 17 years ago - error "missing connection or connection string"
by flamade in Hal umum tentang Pascal Indonesia more 17 years ago - Nangkep suara??
by p2bf in Tip n Trik Pemrograman more 17 years ago - Report Horizontal gimana caranya ?
by MardiahBarnawi in Reporting more 16 years ago - Penjualan Vivo Livo
by noviana in Tip n Trik Pemrograman more 17 years ago - membuat nomor urut di query ms access
by jajang in Hal umum tentang Pascal Indonesia more 13 years ago - JPEG error #41
by dakocan in Tip n Trik Pemrograman more 18 years ago - login
by sulth4n in MySQL more 18 years ago - OOT : Ramadhan
by kaka-delphi in OOT more 18 years ago