Posted by Steve Price on 09-05-2005 09:16 AM:

Image File Sizes

Hi People

We have a little discussion going on in another thread that has lurched into a side issue about the optimal sizes of image files. Rather than continue it as a digression there, I thought it might be useful to open it as a separate topic.

Here are four images. They are identical except for the amount of compression I used in saving them as JPGs. The file sizes are, in order, 307 KB, 156 KB, 84 KB and 42 KB.

I'd like to know at what points others can see loss of detail. I see no differences between the first three images, but the fourth one (42 KB) has less detail than the others. This is most obvious to me in the minor guls. My monitor is set to display 1024 x 768 pixels.

And, for those of you who know how to derive structural information from images like these, I'd be grateful to learn what tkinds of structural information you can get and what you have to be able to see in order to get it.


Steve Price

Posted by Sue Zimmerman on 09-05-2005 03:32 PM:

Hi Steve,
I would like to help you but all of these examples are no good. The good one is the second photo on your initial test. Sue

Posted by Steve Price on 09-05-2005 04:01 PM:

Hi Sue

The four images in the first post on this thread are all made by converting the one you mention, which is a GIF file, to JPG files of various levels of compression.

We are unlikely to change from using JPGs to using GIFs, although it might be fun to compare them. Here, for convenience, is the GIF followed by the least compressed JPG made from it.

But to get back to the point of this thread: at what level of compression do people begin to see loss of sharpness or loss of contrast in an image? My first post has four images, all identical except for file size. How do they compare with each other to you?


Steve Price

Posted by Don Ruyle on 09-05-2005 06:22 PM:

Hello Steve:

Your point is made very well and I appreciate your efforts. The image size works well with my machine and it seems that the only images I have had any trouble with are larger in file size than you ask for, although they may also be from different servers, as I believe you have indicated previously. Filiberto's workaround was the cure. Thanks for taking this into a seperate discussion.


Posted by Steve Price on 09-05-2005 06:39 PM:

Hi Don

Looking at the first four images in this thread: they start with the largest file size and progressively are smaller. At what level do you see loss of detail? As a reminder, in round numbers, the file sizes are (in KB): 350, 175, 85 and 42.


Steve Price

Posted by David R.E. Hunt on 09-05-2005 08:32 PM:

Hi Steve, Sue, Don

Regarding the four images above, they seen to deteriorate in quality in descending order, but only in the last is there a real distortion of figures in the image.

I confess a love affair with this image business, but unfortunately with my job, the family, and my ongoing restoration project I only have time to dabble, but it is fun. Maybe some day I will be enabeled to assemble an apropropriately labeled and organized library of rug images, suitable at least for my particular variety of carpet research ( if you can call it that )

This compressaion and distortion of images lies behind my propensity to use large images. This Ersari chuval, on thesecondpage of the "Small Tekke" thread, is an excellent example of an image which doesn't lend itself to compression without a critical loss of resolution. No matter how big or small, within the paramaters of what is practical on Turkotek, this abrash is distorted to illegible. I circumvented this by posting a link to a full size image on my server, which can be downloaded and viewed as a high resolution image. These Gif images do seem to have better color and definition, owning to those qualities outlined in Filiberto's post, especially those illustrated by this image of a red ring in the circle, and how the Gif file affects distortion and color contamination, but of course the reproduction of carpet photos present special circumstances and considerations, I would think.

Sue, just as with my characterization of my use of rug photos as above, I don't believe we can do honest structural study from photos. If nothing else, how do we go about substantiating our obserervations? None the less, I do think we can learn a lot from large size images, and I love'm .

I you follow this Link to a large scale image of the above small rug fragment from the Weidersperg Collection, I think you will be suprised by the amount of detail, especially considering that this is from a scan of a photo and not from a direct image. You can see a lot, and I think much can be learned from this type of study, but I don't know if I would refer to it as structural research. By the way, you might be suprised at the prices of computers these days. I saw a reconditioned 120 GB, 512 RAM HP tower for under $500.00 the other day.

Only once on the offending thread have I had problems with images, and with James' images for a little while one morning. I have a fairly powerful computer and DSL, so maybe that is the reason behind my lack of problems with the thread.



Posted by Steve Price on 09-05-2005 09:18 PM:

Hi Dave

Your monitor has a set number of pixels for its display. I don't know what yours is, but it's probably less than 1500 pixels in width.

Mine is set for 1024 x 768. No matter how detailed an image file may be, my monitor can't display it with any more detail than 1024 pixels for the full screen width, about 500 pixels if the size of the image is set to be half the width of my monitor. That is to say, there is a maximum resolution that I can't exceed if looking at the image on my monitor is my method of seeing it. But even that is a hypothetical maximum. I sit far enough from my monitor to be unable to see individual pixels. Most other people do, too.

It simply isn't true that any compression of an image file, no matter how minor, results in loss of visible detail. The question I'm trying to get a handle on is, how much compression does it take to reach that threshold for other people. I know about how much it is for me: an image of an object with the detail seen in a fairly fine Turkmen small rug, 400 pixel image width, compressed to 42 KB, is less sharp than the same image at 85 KB. But increasing the file size beyond 85 KB offers no discernable improvement.

Using the four images I posted as subjects, where is that point for you? If you see a difference between the 350 KB image and the 175 KB image, perhaps the optimum for you is considerably above the 350 KB point. Is it?

I'd really like to know how this plays out for a lot of people, since it has implications for how we handle images here.


Steve Price

Posted by Don Ruyle on 09-05-2005 10:03 PM:

Hello Steve:

For my money, the third image is is as good as the first two, even when I copy to pps and zoom in. even though, when I look real close, I can see a gradual detioration from one to three. I think I see all that needs be seen in #3. The fourth image shows considerable degradation and doesn't provide enough clarity of line and the colors become "fuzzy". Clearly, the image that Dave linked might serve for Sue's purposes and dave's "love affair" with size, but considering the 25% increase in the membership, and the time to down load a page of images so large, I can live with the 85kb image. I can cypher real good. Lets see, Jethro: 0+0=0.

Regards, Don

Posted by Tim Adam on 09-06-2005 08:58 AM:

Hi Steve,

In my opinion any of the four images will do for most of the rugs that are discussed on Turkotek. In particular, I think it would be a waste of time and effort to post high resolution images of rugs that generate just a couple of responses. If a piece generates a lot of interest, or if it is qualitatively an outstanding piece, then I think it would be nice if high resolution images could be made available, e.g., in a special folder somewhere for downloading. So, my suggestion is to make high resolution images available "on demand."



Posted by David R.E. Hunt on 09-06-2005 10:35 AM:

Images Part II

Hi Steve

All but the last image are fine with me. It's in this last on I see distortion, specifically of those three double kockak figures at the base of the field and adjacent to the guard stripes. Or is my astigmatism getting worse?

Hi Tim

I agree that in general any of the images (with the exception of #4) suffice on Turkotek, yet sometimes, as with my illustration above with the Ersari chuval, a larger image is required to illustrate a point or idea. Hence my linking to large file sources outside Turkotek. Of course, if the clamoring crowds demand, I will post a large scale file .

Hi Don

You might want to seriously consider investing in a new computer. Prices on even 200GB models are within the range of most anybody, and the difference is astounding. At just 80 GB, my computer makes my wife's 40 GB seem like a dinosaur.


Posted by Steve Price on 09-06-2005 11:13 AM:

Hi Dave

One very inexpensive way to upgrade a computer is to salvage parts from the one you have and just buy what you need. The monitor, keyboard, mouse, floppy drive, CD drive, network adapters, etc. are almost always OK. The existing hard drive is probably big enough to use as a backup drive, and moving it to a new machine makes the files that are on it available if you need them (I delete them after a respectable interval). Bear in mind, too, that the operating system amounts to around $100 of the price of a new machine. If you still have the installation CD for your current operating system (and if it's a decent system like Windows 2000 Pro), you can install it in the new machine.

Not too long ago I did this, building a 2.8 GHz P-4 with 1 GB RAM, decent sound and video cards, and a few bells and whistles, at a cost of around $400. Construction is easy - everything plugs into everything else with connectors that won't go in with the wrong orientation.

Since the topic here is image file sizes, I should point out that very few peoples' ability to see the images well or download them rapidly are limited by their computers if they have enough RAM (which is very inexpensive unless your motherboard is too old to accept the newer sticks).


Steve Price

Posted by Don Ruyle on 09-06-2005 07:08 PM:

Hi Dave:

No. I really don't need much more computer but I do seriously need the new video card. Six months after the computer was built, The maker of the video card went belly-up and so, My S3 Savage is operating with the only aftermarket patch available and it causes enough problems to warant replacing it with the e-Ge-Force FX5500. While I have the box open, I'll add 256kb of ram (doubling it). Then I can plug in this nice 19" monitor that was free and have almost twice the fun! All for about $100. Boy! That from someone who vowed not to become computer literate until 2000 and managed to actually live without one until November of 2001! I haven't learned much in 4 years either, but I enjoy this site.

The problem with James' and Dave's images failing to display after having displayed well at first, probably is in the fact that I seem to remember deleating my cookies sometime in that same time span. (I think that has something to do with what Filiberto said earlier.) The fix that Filiberto sugested, worked great.

Regards: Don

Posted by David R.E. Hunt on 09-07-2005 08:45 AM:

Incompetence= Hire Someone

Hi Don

My advice was geared more toward someone with my level of incompetency . I tried to upgrade an old computer some time ago, and by the time I was finished I had a computer which didn't quite work right yet had cost me as much as buying one straight from the box. But I was just trying to wing it, instead of doing my background research, ect. Steve is right, RAM is the primary factor here (I think ). I don't think cookies are the problem, however. I have at times been unable to log onto Turkotek, but have never had problems with images. But with the dinosaur I tried to upgrade, that's another story. The problems I had with my experiment in retrofitting were along the lines of compatability. Cost of the formentioned HP tower, 2000GB x 512 RAM reconditioned, about $500.00. I paid almost $800.00 for my 80GB x 512 RAM three years ago, just to give an idea where retail prices have gone.


Posted by Steve Price on 09-07-2005 09:18 AM:

Hi Dave

Compatability issues arise with upgrades to an old computer, but are easy to avoid when building a new one. Many vendors sell "barebones" systems, in which you select specific components from a menu of options (case, power supply, motherboard, processor, RAM, etc.), omitting what you don't need. Most will assemble and test the parts that are ordered together. In my case, the items listed in this message were ordered and arrived assembled. I added drives, sound and video cards, monitor, keyboard, mouse, speakers, and my old operating system.

A little preliminary research is helpful. The internet is full of useful information about computer hardware and how to install it.


Steve Price

Posted by Chuck Wagner on 09-07-2005 09:36 PM:

Decisions decisions...

Hi all,

It's always nice to have several examples to work with when discussing image management, so here they are.

Some comments up front:

The JPEG compression algorithm is very efficient, but because it is a "lossy" method (it throws away some of the data), it tends to cause certain image characteristics to be more strongly affected than others by compression. Areas with very little variation tend to compress quite well, but areas with lots of detail ( frequent color and contrast transitions) do not.

The algorithm uses windowing (multipixel) functions, and a sort of averaging is performed that can cause blocky artifacts in regions of monotonous appearance (such as large areas of variable but similar color), and sharp edges or thin sharp lines, can become degraded and fuzzy.

In addition, because JPEG compression is "lossy", it is a bad idea to compress a file more than once; image degradation is enhanced by iterative file compression.

So, some thought needs to go into how you prepare your images for posting. Do your edits, resizing, and color manipulations up front and do the compression as the final step, saving into a separate file. Then check the file size, because if it's too big Our Moderator is likely to compress it again and the image may suffer as a result.

Here are some examples to consider when thinking about file compression, showing several images typical of Turkotek posts.

All images have been prepared using Irfanview. Compression occurs as a part of the SAVE or SAVE AS functions, and is separate from the RESIZE function in the IMAGE pull down menu.

So, when discussing compression levels, I refer to the parameter appearing in the JPEG/GIF options dialog panel in the Irfanview SAVE AS function, which specifies the percentage of the original file size remaining after compression. Thus, 75% means a compression target of 25% reduction in file size.

I hope these examples help you decide which level of compression fits best with the features you are trying to highlight with your images.

Hat tip to Steve, who has been very generous with disk space.

The first two examples are closeup shots showing good detail. Images were resized down to 33% prior to compression. Compression levels, in order, are 100%, 75%, 50%, 37%, and 25%. At 50%, artifacts are barely beginning to appear. 37% and 25% have noticable degradation:

The next example is a direct scan showing extreme detail. No resizing was performed prior to compression. Compression levels, in order, are 100%, 75%, 50%, and 25%:

The next two examples are shots of entire pieces with large areas of similar color. Images were resized down to 33% prior to compression. Compression levels, in order, are 100%, 75%, 50%, and 25%. You can see the blotchy appearance starting to show up at 50%:

A set of large images was at this location in the original post. It has been moved to a separate post, noting Filiberto's comment, to make this one easier to read.

The next set of images is from the same master as those above, but resized down to 485 X 646 pixels prior to compression. Compression levels, in order, are 100%, 75%, 50%, and 25%. The alternating black & white bands on the tassles and the upper left red-orange area show artifacts as compression increases:

The last set of images shows the effect of compressing a file that has already been compressed once. Error due to data loss accumulates and degrades the image severely.

As often repeated in the Middle East, YOU NO DO THIS ONE!.

The first has been compressed once, to 75%:

The second has been compressed to 75%, and then again to 50%:

The third has been compressed to 75%, then to 50%, and then to 25%. Not a pretty picture:

Chuck Wagner

Posted by Filiberto Boncompagni on 09-08-2005 01:41 AM:

Thanks Chuck,

A couple of considerations.

When you write “Compression levels, in order, are 100%, 75%, 50%, and 25%” it could be misleading. You refer to the Resize/Resample option in Irfanview, followed by “Percentage of original”.

So 100% (of the original) really means NO compression at all, 75% of the original means 25% compression and so on…

An undesirable consequence of using images wider than, say, 55O or 650 pixels (depending on which display mode you use, the most common being 800 x 600) is that they make the page too wide. The text follows the width and we are obliged to scroll it horizontally in order to see it. You used widths up to 960 pixels and the result is evident. That’s why it’s better not exceeding the width of 550 pixels for our images.



Posted by Filiberto Boncompagni on 09-08-2005 01:50 AM:

Another undesirable consequence of using big images – as we saw in the other thread, but it’s more evident here and now – is that, even on a fast connection, the browser takes a lot of time to download them.

Quod erat demonstrandum.



Posted by Chuck Wagner on 09-08-2005 07:49 AM:

Large images now in separate post, here.

Hi all,

Noting Filiberto's comments, I edited the original post
(rather than put the whole thing in twice) and made more
explicit additions to the comments on compression in Irfanview.

These are the large images moved from the previous post.

The next set of images have been resized down to 50% prior to
compression from a very large 5 megapixel original. Compression
levels, in order, are 100%, 75%, 50%, 25%, and 15%. The large
areas of similar reds & oranges suffer greatly as compression
increases. Becase the detail features are physically bigger than
in the following example sets, some degradation of detail is also
apparent, in particular the texture of the flatweave sections:

Chuck Wagner

Posted by Jerry Silverman on 09-09-2005 02:47 AM:

All of this is very interesting, but I've got to admit that I can scarcely make out any difference between the images that are not compressed and those that are extremely compressed. To be sure it's there if one looks really, really closely. But even the most compressed is sufficient to convey the needed information for the purposes of the discussions here. Most of the defects of the highly compressed images could be minimized by holding the camera closer to the object. (My Nikon Coolpix 4500 - already obsolete - can focus to 3/4". On a tripod it's easy to do.)

I can't see where our existing policy on holding images to under 100k needs to be changed.



Posted by Chuck Wagner on 09-10-2005 09:30 AM:

Hi Jerry,

These additional mages were posted to provide additional examples for folks to review, not to make a case for using larger images. Although I occasionally carp about wishing to use large images, I'm almost always satisfied with the 100K limits.

Those few occasions where larger images are considered important can be handled with additional explanatory text in the image submission email sent to the moderators.

As an aside, using Irfanview to toggle back and forth between two images can be a very instructive exercise. Although it is true that differences are difficult to perceive when viewing images side by side, they become screamingly obvious when using what is called the "blink comparator" approach. Irfanview moves from one image file to the next (in a folder) with a slight rotation of the mouse wheel, allowing you can switch rapidly from one image to another. Subtle changes become very visible this way.


Chuck Wagner

Posted by Steve Price on 09-10-2005 10:39 AM:

Hi Chuck

Great detail can be displayed with small image files by using selectively cropped images to show those details. If someone wants to see individual knots, he doesn't need an image of more than a couple of square inches of the rug to see them.

I use a variant of your Irfanview method to flip back and forth between images in he same spot. I download them from the web page (right click on the image, select "Save Image", then open them in Internet Explorer, which lets you have more than one copy running at a time. A mouse click then lets me toggle between them. Makes small differences very obvious.


Steve Price