Solved

Source Code for saving to JPEG

Posted on 1998-08-24
7
149 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
[X]
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
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…

730 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