Solved

Converting bmp to jpeg

Posted on 2000-02-19
3
314 Views
Last Modified: 2013-11-19
Is it possible to convert a bmp to a jpeg with delphi?  If so, can I have some code please.

I'm new to delphi so please be gentle (I need a descriptive answer).  I've been using vb for some time, but I find it lacking in some areas.  So far, from what I've seen delphi kicks butt.  The problem of course is, I don't know how to code in delphi-pascel.
0
Comment
Question by:fibdev
[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
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
inthe earned 50 total points
ID: 2538816
Hi Fibdrv,
there is example about half way down this page:

http://www.efg2.com/lab/library/delphi/graphics/FileFormatsAndConversion.htm#Conversions 

+ many other useful conversions also ;-)


here is examaple from above page :

PROCEDURE ConvertBMPtoJPG (CONST BMPName: STRING; JPGName: STRING);
  VAR
    Bitmap: TBitmap;
    JPEG : TJPEGImage;
BEGIN
  Bitmap := TBitmap.Create;
  JPEG := TJPEGImage.Create;
  TRY
    Bitmap.LoadFromFile(BMPName);
    JPEG.CompressionQuality := 80;
    JPEG.Assign(Bitmap);
    JPEG.SaveToFile(JPGName);
  FINALLY
    Bitmap.Free;
    JPEG.Free
  END
END {ConvertBMPtoJPG};  

Converting a BMP to a JPEG and Vice Versa (TI4528D)
http://www.borland.com/devsupport/delphi/ti/TI4528D.html 

http://www.efg2.com/lab/Graphics/BMPJPG.htm 
efg's BMPJPG Lab Report. Interactively convert BMPs to JPGs or vice versa. Nearly all the JPEG compession options cn be controlled via the user interface, including image quality and progressive encoding and display.

efg's Command-line utility for batch conversion of BMPs to JPGs: BMPtoJPG.PAS
http://www.efg2.com/lab/library/delphi/graphics/BMPtoJPG.PAS.txt 

Regards Barry


0
 
LVL 3

Author Comment

by:fibdev
ID: 2538878
I found the answer to this in the help files, but it would not be in good form to deny you the points.

Thank you
0
 
LVL 17

Expert Comment

by:inthe
ID: 2538922
cheers :-)

ps.
dont forget to look at the efg site it really good for graphics and files stuff.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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
Delphi 2 92
Firemonkey webbrowser scrollbars ? 1 73
Tidtcpserver listening on multiports? 1 56
IP without any Dots 1 99
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Many programs have tried to outwit PowerPoint in terms of technology and skill. These programs, however, still lack several characteristics that PowerPoint has possessed from the start. Here's why PowerPoint replacements won't entirely work for desi…
In this second Micro Tutorial in the series,  viewers will learn more basic shortcuts and functions of Illustrator. In this tutorial you will learn about the eyedropper tool, zoom , ellipses and more.
Learn how to use the remote presentation tool in Prezi to allow you to harness the power of this cloud based presentation platform. You can show your presentation with a remote audience using this free tool.
Suggested Courses

752 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