0% found this document useful (0 votes)
31 views4 pages

Praktikum Pengolahan Citra Digital: Laporan 1

This document discusses a digital image processing practical assignment. It can only read JPG and BMP image files, and only save files in BMP format. It can display two images. The document provides source code for an image viewing form that allows loading and saving images, resizing the form based on the image size, and displaying information about the image in the status bar.

Uploaded by

Ady Cliquers
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views4 pages

Praktikum Pengolahan Citra Digital: Laporan 1

This document discusses a digital image processing practical assignment. It can only read JPG and BMP image files, and only save files in BMP format. It can display two images. The document provides source code for an image viewing form that allows loading and saving images, resizing the form based on the image size, and displaying information about the image in the status bar.

Uploaded by

Ady Cliquers
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Laporan 1

PRAKTIKUM PENGOLAHAN CITRA DIGITAL

Asisten :
Andi Tarmizi Kr.Rapi, S.Kom
Edi Irsan

Disusun :
Nama : Ady Sanjaya
NIM : 60200113051
Kelas : C

JURUSAN TEKNIK INFORMARTIKA


FAKULTAS SAINS DAN TEKNOLOGI
UNIVERSITAS ISLAM NEGERI ALAUDDIN
MAKASSAR
2016

1. Hanya Bisa membaca file Gambar berektensi JPG dan BMP

2. Hanya bisa menyimpan File menjadi gambar berkestensi BMP

3. Dapat menampilkan 2 gambar

Source Unit Citra


procedure TFormCitra.MenuSimpanClick(Sender: TObject);
begin
if (SavePictureDialog.Execute) then
Image.Picture.SaveToFile(SavePictureDialog.FileName);
end;

Source Unit Utama


procedure TFormUtama.ButtonAmbilCitraClick(Sender: TObject);
var
fc : string;
b1 : TBitmap;
p1 : TPicture;
begin
if (openpicturedialog.execute) then
begin
if (FormCitra = nil) then
Application.CreateForm(TFormCitra,FormCitra);
if
(LowerCase(ExtractFileExt(OpenPictureDialog.FileName)) = '.bmp' )
then

FormCitra.Image.Picture.LoadFromFile(OpenPictureDialog.FileName)
else
begin
p1 := TPicture.Create;
p1.LoadFromFile(OpenPictureDialog.FileName);
b1 := TBitmap.Create;
b1.Height := p1.Graphic.Height;
b1.Width := p1.Graphic.Width;
b1.Canvas.Draw(0,0,p1.Graphic);
b1.PixelFormat := pf24bit;
FormCitra.Image.Picture.Bitmap := b1;
FormCitra.Image1.Picture.Bitmap := b1;
FormCitra.Image1.Left := FormCitra.Image.Width +50;
p1.Free;
end;
FormCitra.ClientWidth := FormCitra.Image.Picture.Width +
FormCitra.Image1.Picture.Width + 60;
FormCitra.ClientHeight := FormCitra.Image.Picture.Height + 20;
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.Height))+'x'+
IntToStr((FormCitra.Image.Picture.Width))+', '+
fc+')';
end;
end;

You might also like