Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Source Code for saving to JPEG

Posted on 1998-08-24
7
145 Views
Last Modified: 2010-04-04
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
Comment
Question by:d_kiernan
  • 4
  • 2
7 Comments
 
LVL 10

Expert Comment

by:viktornet
ID: 1337507
Do you need a component or just a source code on how to work with JPG???

Regards,
Viktor Ivanov
0
 
LVL 4

Expert Comment

by:erajoj
ID: 1337508
Using Delphi 3 or 4?

/// John
0
 

Author Comment

by:d_kiernan
ID: 1337509
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.

 
LVL 10

Accepted Solution

by:
viktornet earned 30 total points
ID: 1337510
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
 
LVL 10

Expert Comment

by:viktornet
ID: 1337511
There is a word object which is not suppose to be there,....just erase it =)

Regards,
Viktor Ivanov
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1337512
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
 

Author Comment

by:d_kiernan
ID: 1337513
Thanks experts, that should do the trick

regards
Donagh
0

Featured Post

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Mydac connection data base issue 3 166
how to center only a line in richedit? 4 61
How to call a form that is in a DLL  from an application? 13 79
Delphi selector screen 2 84
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question