|
-
Hex to JPEG
Hi,
I'm having problems converting my image back to jpeg format. The code i used to get from jpeg to hex is as follows:
for (int i = 0; i < ba.length; i++) {
String hex = Integer.toHexString(0x0100 + (ba[i] & 0x00FF)).
substring(1);
ret.append((hex.length() < 2 ? "0" : "") + hex);
}
where:
ba is a byte[] which contains the image in jpeg format
ret is a string buffer, which stores the image in hex format.
i can't work out how to convert back to jpeg format
thank you in advance
Similar Threads
-
By mattbiegner in forum C++
Replies: 6
Last Post: 08-06-2005, 11:01 PM
-
By soomrowaseem in forum VB Classic
Replies: 2
Last Post: 02-19-2005, 01:31 PM
-
By Dan Fergus in forum .NET
Replies: 3
Last Post: 08-23-2001, 01:39 PM
-
By Sarel j Smit in forum Database
Replies: 1
Last Post: 05-24-2001, 10:35 PM
-
By David Uzcategui R in forum Java
Replies: 0
Last Post: 05-24-2000, 11:42 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks