This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 41124
If you want to support older JVMs as well, there's JIMI, which can read and write the formats you mention.

Ping & DNS - my free Android networking tools app
It is sorta covered in the JavaRanch Style Guide.
subject: Convert BMP Files to JPG
Similar Threads
HTTP Status 404 The requested resource is not available
convert image(.jpg) in to binary format using java
How to place image on JButton
upload system with ajax/java
Displaying QuickTime .pic images