Problem with JPEG file

A

Amar

hello all,

I am accepted an a JPEG file from user and created a BufferedImage
from it with type as TYPE_INT_RGB.

By using BufferedImage.getRBG method to get the pixels, I displayed
those pixels on the screen.

From those array of pixels, I created another image and saved it by
another name.JPG

Now the problem is when I am trying to display the pixels of the newly
created image they are different from the old image.

Someone told me that this problem is due to JPEG compression.

Can anyone suggest me a way to save the image in JPEG form in this
situation?

Basically I am writing an application where I want to compare the two
above images. But their pixels are not matching.
 
J

JScoobyCed

Amar said:
hello all,

I am accepted an a JPEG file from user and created a BufferedImage
from it with type as TYPE_INT_RGB.

By using BufferedImage.getRBG method to get the pixels, I displayed
those pixels on the screen.

From those array of pixels, I created another image and saved it by
another name.JPG

Now the problem is when I am trying to display the pixels of the newly
created image they are different from the old image.

Someone told me that this problem is due to JPEG compression.

Can anyone suggest me a way to save the image in JPEG form in this
situation?

Basically I am writing an application where I want to compare the two
above images. But their pixels are not matching.

Well, it is not directly a Java issue. More it is a imaging issue.
Anyway, I'll try to help.
Do you control the sender of the initial JPG image ? That is, could you
force the sender to send in a different format --i.e. directly the array
of pixel--) ?
If not, you could try some edge detection algorithm for your comparison.
 
T

Thomas Weidenfeller

Amar said:
hello all,

I am accepted an a JPEG file from user and created a BufferedImage
from it with type as TYPE_INT_RGB.

What was wrong with the answers you got for your previous post? Did you
at least read them?

/Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top