Opening Secret Partition, Appearing Picture With Jpeg Format In To Image 1 Component In Borlan Delphi 7
When trying to load picture from the folder through open dialog component to be visualized in component image, it is easy to those who knew the secret, but it was difficult for the writer at that time. Whereas the secret is just in the form of 4 letters (characters) and a reading tag.
This is the explanation of the essay theories: Picture standard format that is able to be visualized in component image Delphi (there is in Pallete component: additional) is Picture with bitmap format while the picture that will be visualized is in Jpeg format. However, it is weird when we load the picture directly through that component (image 1) before execution (through object inspector> Picture then trace the picture from computer), then the picture can appear directly. It is different when we load picture with Jpeg From folder with open dialog component.
With source code:
procedure TForm1.ButtonCariGambarClick(Sender: TObject);
begin
if opendialog1.Execute then
image1.Picture.LoadFromFile(opendialog1.FileName);
end;
Note: picture that is chosen by Jpeg Format
Then will appear error message which means the picture Format is not supported.
To solve the problem in ‘uses’ line (in source code writing unit) add Jpeg, so that become picture as follows below:
figure. Add Jpeg to uses
Next, please execute the program and load the picture from the folder through open dialog component.the Picture Will loaded successfully
I hope this article can give benefit to the visitors, readers, developer and me. Thanks for visiting and availability for sharing this article by pressing
or just press like button under this posting
I hope this article can give benefit to the visitors, readers, developer and me. Thanks for visiting and availability for sharing this article by pressing
Share this on Facebook |