File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other JSE/JEE APIs and the fly likes Convert BMP Files to JPG Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Convert BMP Files to JPG" Watch "Convert BMP Files to JPG" New topic

Convert BMP Files to JPG

Ravi Kiran Tadiparthi

Joined: Dec 30, 2003
Posts: 7
Hi All,

I am looking for an easier way to convert BMP files to JPG files dynamically inside a Java program. Can anyone provide me with some code for doing this?

Thanks in Advance.

Thanks in Advance,<br />Ravi.
D Rog
Ranch Hand

Joined: Feb 07, 2004
Posts: 472

I do not have such code examples in exact form you need, but I can give you an idea:
1. check javax.imageio.*
2. find a provider for input image and use a reader on it
3. then use writer for target image

Retire your iPod and start with HD Android music player Kamerton | Minimal J2EE container is here | Light weight full J2EE stack | and build tool | Co-author of "Windows programming in Turbo Pascal"
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
If you want to support older JVMs as well, there's JIMI, which can read and write the formats you mention.
I agree. Here's the link:
subject: Convert BMP Files to JPG
It's not a secret anymore!