[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

Source Code for saving to JPEG

I need to find source code or a Delphi component that I can compile into my EXE. Source can be C, C++ but preferably Delphi object pascal

thank you
0
d_kiernan
Asked:
d_kiernan
  • 4
  • 2
1 Solution
 
viktornetCommented:
Do you need a component or just a source code on how to work with JPG???

Regards,
Viktor Ivanov
0
 
erajojCommented:
Using Delphi 3 or 4?

/// John
0
 
d_kiernanAuthor Commented:
I am currently using Delphi 3 and C++ Builder 3 and what I need is code (source prefrerrably) to save a bitmap out to JPEG. I can't use DLL's I need all the code to be within the EXE.

Donagh
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
viktornetCommented:
here is what you need...

var
  MyJpeg: TJpegImage;
  Image1: TImage;
begin
  Image1:= TImage.Create;
  MyJpeg:= TJpegImage.Create;
  Image1.LoadFromFile('TestImage.BMP');
  MyJpeg.Assign(Image1.Picture.Bitmap);  
object
  MyJpeg.SaveToFile('MyJPEGImage.JPG');
end;
Hope this helps..
Regards,
Viktor Ivanov
0
 
viktornetCommented:
There is a word object which is not suppose to be there,....just erase it =)

Regards,
Viktor Ivanov
0
 
viktornetCommented:
One more thing ...don't forget to free the objects you created when you finish working with then..like this....

Image1.Free;
MyJpeg.Free;

Regards,
Viktor Ivanov
0
 
d_kiernanAuthor Commented:
Thanks experts, that should do the trick

regards
Donagh
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now