View Full Version : Image compression and conversion?


Carcano
12-31-05, 01:03 PM
From what I've read about jpg images I believed they are compressed every time they are saved to a new medium (web to harddrive, hardrive to CD), and this results in a loss of data and significant image clarity.

Isn't there a program available somewhere that will convert a jpg image to png or tiff format AS its being saved to your hardrive??? I understand that png and tiff images are not degraded by repeated recording...they stay as clear as the originals.

dsdsds
12-31-05, 01:13 PM
From what I've read about jpg images I believed they are compressed every time they are saved to a new medium (web to harddrive, hardrive to CD), and this results in a loss of data and significant image clarity.


No. (I don't think so). Jpg, as any other digital file does not lose any data when copied from one place to another. If you EDIT and save a jpg, then you will lose quality.

If your original is a jpg, don't convert. Just keep it as it is the best quality of that picture you can ever have.

Stryder
12-31-05, 01:18 PM
I believe thats really down to what settings the programs you use to copy/store/change them are rigged to.

for instance if you have a JPG image you save at 80% compression and you then save the same image again with 80% compression it's now actually at 64% compression from what you originally save.

The more interations of Such save processes the more loss you'd have.
(It's not just saving, sometimes the programs used to "preview" do this)

PNG does store more information and closer to a BMP or Raster image. (I'm going by what I remember, however I'm sure the guys on the forums that deal with Radiotelescopes have even more information on Imagery.)
What ever loss has been attributed by a JPG conversion will not be fixed by saving it as a PNG.

In certain respects I have to admit I would like using PNG images in webdesign now with the increase in bandwidth people have available and the fact that they are cleaner/sharper and take up less room than a BMP (Bitmap).

Avatar
12-31-05, 01:34 PM
In certain respects I have to admit I would like using PNG images in webdesign now with the increase in bandwidth people have available and the fact that they are cleaner/sharper and take up less room than a BMP (Bitmap).
It's been increasing mainly in cities, but not really in rural areas. Some of my friends in the country still are bound by dial-up or more often they connect to the net through a mobile phone.

Carcano
12-31-05, 09:23 PM
I believe thats really down to what settings the programs you use to copy/store/change them are rigged to.

for instance if you have a JPG image you save at 80% compression and you then save the same image again with 80% compression it's now actually at 64% compression from what you originally save.

The more interations of Such save processes the more loss you'd have.
(It's not just saving, sometimes the programs used to "preview" do this)

PNG does store more information and closer to a BMP or Raster image. (I'm going by what I remember, however I'm sure the guys on the forums that deal with Radiotelescopes have even more information on Imagery.)
What ever loss has been attributed by a JPG conversion will not be fixed by saving it as a PNG.

In certain respects I have to admit I would like using PNG images in webdesign now with the increase in bandwidth people have available and the fact that they are cleaner/sharper and take up less room than a BMP (Bitmap).


Thanks for the tips! I've started using a program called Total Image Converter which can convert jpg images to tiff or png, but the real problem is that first compression that takes place when the image is saved onto the hard drive from the web. This degrades the clarity of the image quite a bit.

I'll look around some astronomy forums and see how they get around this problem.

glaucon
01-01-06, 12:55 AM
Carcano,

Just remember, when you conert from a more 'lossy' type compression scheme to less lossy compression scheme, your image is always going to look degraded. This is because the program has to interpolate, literally create new pixels to fill up the spots. This is why it's always best to save an image at the least lossy format (Tiff, or RAW if aplicable).

Carcano
01-01-06, 01:34 AM
Carcano,
This is why it's always best to save an image at the least lossy format (Tiff, or RAW if aplicable).

Ok, but how? How do I set my browser so that it saves web images to the hard drive without data loss? Right now I'm using FireFox. Is it only possible using Explorer.

Or, maybe I need a special 'download utility' instead of the standard browsers???

Voodoo Child
01-01-06, 02:34 AM
Ok, but how? How do I set my browser so that it saves web images to the hard drive without data loss?

You don't. The image is already compressed using a lossy format before it is served. It is extremely likely that the server itself will encounter the uncompressed image. It would make little sense to compress the image after it passes over the network connection; you'd just waste CPU cycles/ram on the compression/uncompression. You receive a compressed image and your browser uncompresses it. The image is degraded and info lost by the original act of compression.

AntonK
01-01-06, 02:55 AM
Here's how it works. You need an IMAGE program in order to uncompress and recompress (what you're talking about when you say that its losing even more when its saved from the web). When you save it to your harddrive... NOTHING IS LOST. Absolutely nothing. When you save anything from the internet, it doesnt care WHAT kind of file it is, it does a simple byte by byte transfer of the data. Yes I said data, not image. Because Internet Explorer or whatever you're using doesn't care that its an image or movie or webpage or whatever when it downloads it. The only way to lose quality is to open the image up in something like Photoshop and to resave as a JPG.

The trust is. Once I save an image (in a program like Photoshop) once, I usually save it at 100% everytime after. That 100% is actually an error allowance. If you say 100% you're telling it not to allow for ANY error, you want it as damn close to what you're seeing already. If you save it at 90% you're saying you want it 90% the same (visually... which may not be what you think it is). All image compression algorithms work off an error allowment.

But finally... and let me stress again, unless you're opening the image in a program such as Photoshop or something of that sort, moving the file around from one place to another, such as from the internet to your harddrive, or from your harddrive to a disk, etc, DOES NOT CHANGE THE IMAGE AT ALL. Hope that clears things up for you :)

-AntonK

dsdsds
01-01-06, 09:18 AM
It looks like my initial post (second from the opening post) was completely ignored. It's actually the only post (apart from Antonk's reiteration) that completely answered the question.

AntonK
01-01-06, 11:13 AM
You are correct dsdsds, I just wanted to really drive the point home. Emphasizing certain points to be sure everyone got it. Wasn't trying to steal your thunder :)

-AntonK

Carcano
01-01-06, 12:40 PM
But finally... and let me stress again, unless you're opening the image in a program such as Photoshop or something of that sort, moving the file around from one place to another, such as from the internet to your harddrive, or from your harddrive to a disk, etc, DOES NOT CHANGE THE IMAGE AT ALL. Hope that clears things up for you.

Here's a quote from http://www.shortcourses.com/how/files/files.htm in reference to jpeg image degradation:

"Everytime you open one of these files, and then save it again, the image is compressed. As you go through a series of saves, the image becomes more and more degraded...Also, when you save an image as a jpeg. the image on the screen won't reflect the compression unless you load the saved version."

This is exactly what I've noticed. You will download a jpeg image from the web and it will look perfect on your screen, but then if you save it to your hard drive or CD and look at it later, it will show signs of dithering and distortion.

There are even programs like UnJpeg and JpegEnhancer that can be used to restore the image clarity to a saved Jpeg image. I might have to buy one of those programs as a last resort.

Avatar
01-01-06, 12:45 PM
You are hopeless...
The image quality doesn't change if you download it from the Internet, there is no compression at that stage.

It only changes if you open it with Photoshop (for example) or another image *editor* and then save.
But then it too depends on how the editor is set up.

dsdsds
01-01-06, 02:25 PM
You are correct dsdsds, I just wanted to really drive the point home. Emphasizing certain points to be sure everyone got it. Wasn't trying to steal your thunder :)

-AntonK
- there's no "thunder" to steal :)


Carcano quote:
There are even programs like UnJpeg and JpegEnhancer that can be used to restore the image clarity to a saved Jpeg image. I might have to buy one of those programs as a last resort.

There is nothing you can do or no software available to "decompress" or "restore" an image. These programs reduce noise or sharpen edges, etc. They increase resolution by filling gaps with calculated "best guess". The filled gaps is NEW data and is not always accurate. I guess they have have their uses but I wouldn't use them. I definetly wouldn't use them to replace an original-- nomatter how bad the original is.

Carcano
01-01-06, 03:57 PM
There is nothing you can do or no software available to "decompress" or "restore" an image. These programs reduce noise or sharpen edges, etc. They increase resolution by filling gaps with calculated "best guess". The filled gaps is NEW data and is not always accurate. I guess they have have their uses but I wouldn't use them. I definetly wouldn't use them to replace an original-- nomatter how bad the original is.

I've just been experimenting with a program I downloaded called UnJpeg http://www.unjpeg.com

It has four basic categories of jpeg image enhancement that you can set to a scale of 1 to 10.

1. Blotchy look removal
2. Artifacts removal
3. Unsharp mask
4. Crispness

After using each of these separately I've found that only the 'Blotchy look removal' improves the image clarity...and very significantly, so I set that at 10 and leave everything else at zero.

You can compare the original and enhanced images very simply...right click over the image and hold.