Solved

Converting bmp to jpeg

Posted on 2000-02-19
3
316 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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…
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…
In this Micro Tutorial viewers will learn the basic shortcuts and functions in InDesign.
In addition to being a great web-based presentation tool, Prezi also makes it easy to save your presentation as a PDF to share with others as well. Learn how in this tutorial. Select the share icon from the top menu in your Prezi editor: Select "D…
Suggested Courses
Course of the Month6 days, 21 hours left to enroll

622 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