Solved

JPG-Decompression in Java

Posted on 1998-06-05
4
258 Views
Last Modified: 2010-05-18
Hello

I want to send JPG-Pictures with a Socket-Stream to an Applet!! (Byte-Arrays)

But I have no Idea, how I can decode the Picture in Memory.

thanx for help

:-)
      Dennis

Please help
0
Comment
Question by:mer
[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
  • 3
4 Comments
 
LVL 5

Accepted Solution

by:
fontaine earned 100 total points
ID: 1222199
I think you have here what yu need:

http://lcavwww.epfl.ch/demos/jpeg.html
0
 
LVL 4

Expert Comment

by:evijay
ID: 1222200
You draw the image on an offscreen canvas which you create on the server side (program which uses ServerSocket), use pixelgrabber class to get the bytes of the image, send the image to applet. In the applet side, use MemoryImageSource to construct back the Image from array of bytes and display the image where ever you want.
0
 
LVL 4

Expert Comment

by:evijay
ID: 1222201
You can also read the jpeg image file as byte stream, send it to the applet, applet uses Toolkit.getDefaultToolkit().createImage(byte[] imagedata) method to create the Image back and display

0
 
LVL 4

Expert Comment

by:evijay
ID: 1222202
The createImage method understands the byte array format to be either gif or jpeg and handles appropriately

0

Featured Post

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

623 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