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

Quality image

Kia Phia Ben
Ranch Hand

Joined: Dec 16, 2005
Posts: 48
Hi all
I have problem when I writing my program.
I have two image: A.jpeg and B.jpeg. I do not know what image which have quality highter than other image?
Please tell me how to know quanlity of image with Java.
Thank for help me.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15046

I typed in "java jpeg quality" in Google and got a whole list of answers in a fraction of a second. This one looks useful:

The Java Developers Almanac - Compressing a JPEG File

It shows how you can set the compression quality when writing a JPEG with the Java ImageIO API.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42959
What does or does not constitute high quality is of course a subjective notion.

Assuming that both images are of the same pixel size, and are in fact the very same image, then it is pretty safe to assume that the one that is larger in byte size has a higher quality.
I agree. Here's the link:
subject: Quality image
It's not a secret anymore!