PDA

View Full Version : Save for Web "missing the target size?"



Jim Poor
02-18-2008, 09:47 AM
Ok, I know how to save for web and I also know about the optimize to file size option too.

The problem I am having is that Save for Web is missing the specified target size. It always misses the file size, by a little bit. On images that have a nice smooth BG or little BG details the margin of error is small enough not to make a difference.

The trouble comes in when saving a file that has a lot of detail in the BG. A couple of recent examples are a a squirrel spread out flat on a tree trunk ( a lot of detail in the bark patterns which fill the frame) and a macro of a fungus (lots of detail in the gills which fill the frame).

I used the optimize to file size option on the fungus and set it to optimize to 100kb, the actual size on disk was over 180kb. For the squirrel, I set the file size to 100kb and the actual size on disk was over 160kb.

I've heard others mention that save for web has a tendency to underestimate the final size but never really noticed until I tried it on images with highly detailed BGs.

If anyone doubts it, note the size that save for web says it will produce, and then look at the file's actual size. Again this will be more noticed with an image with a LOT of frame filling details.

Alfred Forns
02-18-2008, 04:12 PM
JIm that should not be happening If you select the box and specify the size it will be that size

Try going to that box every time you do the procedure Don't assume it has been set for 140 Go through the motion and make the box come up and say ok !!

Jim Poor
02-18-2008, 04:36 PM
Just checked and re-checked. Same problem. I still think it has to do with the level of BG detail. I've been able to get images down to 10kb with no problem on a plain studio stile BG.

E.J. Peiker
02-24-2008, 10:23 PM
I'm guessing you aren't using it the way it was intended. You have to go to the little arrows and click on Optimize File Size every single time you do a Save for WEB. It's not a setting that you set once and then every time it will limit it to that maximum file size. Its something you have to do for every photo. The setting is sticky so you don't have to re-enter the number every time, but you do have to click on the little arrows and select Optimize File Size for every photo that you want to limit the file size to.

Jim Poor
02-25-2008, 06:51 AM
Nope, I go click on the option every time and get the same sort of result.

Alfred Forns
02-25-2008, 07:29 AM
Thanks E.J. btw never understood why it works they way it does

JIm It would seem that when saving as ..... the bg would make a difference in the final size but when you specify the size there should be no difference Will work it out !!!!!

Jim Poor
02-25-2008, 07:35 AM
Yeah, I'll show you what I'm talking about with one of the fungus images when I get to FL. I've seen other people talk about save for web missing the target size, so I know I'm not completely insane :D

Robert Amoruso
02-25-2008, 12:52 PM
Jim,

You did not mention you where doing this in an action, so I assume that is not the problem. You are correct, more BG information, the lower the Quality setting chosen when you use the file size limitation method. I always set it to 140kb and that works for me all the time.

BTW: The problem with actions is that when you record it, the action records the quality setting and not the file size limitation. So next time you run it, you get a different file size. I have my actions set up to save in a Q=50 (lots of detail like a forest), Q=65 (detail mid-way between forest and sky), Q=85 (sky), Q=100 (for those I know will get below 140kb like a white bird on a blue sky).

Hopes this helps.

Jim Poor
02-25-2008, 01:14 PM
Thanks, You're right, I'm not using an action. I use 140 KB for most images with no problems. Every now and then one will come in about the site limit still and then I just go with 120. With the macro fungus image that started this whole thing though, I set it at 100 after 140 and 120 didn't work and it still came in too big. I think save for web always fudges on the file size a little, but when there is a lot of detail, the potential is for nearly double what one selects in the optimize to file size option.

Robert Amoruso
02-25-2008, 02:41 PM
It is curious that you say that Jim. Regardless of how much detail in the image I usually get just the right file size when I set the file size limits. I will monitor this more closely and see if there is a pattern. An interesting problem.

E.J. Peiker
02-26-2008, 09:55 PM
In 8 years of using this function, it has never made an error. File sizes are always at or slightly below the specified target. I have used it on at least 100 systems in that time. If its a real bug then its a pretty obscure one that only occurs in a very unusual situation. Perhaps whatever this unusual situation is, is part of your workflow. One thing that could do it is if you are saving for WEB a file too large to compress down to the target size with maximum JPEG compression but that seems nearly impossible in 750 or 800 pixel wide photos.

I think to get to the bottom of this, one would need screen shots of your selections in Save for Web on every screen that you go to including when you have different pull down menus in play. Additionally, what are the exact steps in your workflow leading right up to the Save for Web action. This would allow someone to try to recreate the steps to see if it occurs for them.

Also, what happens when you do do a Save For Web on another machine of a file that gives you a size larger than you specified on your computer?

Jim Poor
02-27-2008, 08:40 AM
Ok, E.J. I took screen shots of the process with an image this morning. The series can be found in the first few images here:

http://www.pbase.com/jimpoor/tests_and_comparrisons

The sequence is:
The image size dialog while resizing to 800 pixels
The SFW dialog with the sticky settings that are there when it opens
The Optimize to file size dialog
The SFW dialog with the new 100K target entered
The Save Optimized As dialog
The Get Info box showing actual file size after the save


For those who want the executive summary the Save for Web dialog shows the final size to be 81.05K, but a check of the actual file size on disk shows it to be 108K. Since I told it to save to a file size of 100K, that is an 8% error. If you take the dialog's own final output size of 81.05K, then the error is even greater.

In this particular case, I would still be well under the 150K size limit, but I have seen larger errors, up to 80% over what was specified. Had I told the Save for Web to save to a file size of 140K with an 8% margin of error, the final image would be over the limit.

If anyone can ID a step to change in the series to get things to match I'd be delighted.

E.J. Peiker
02-27-2008, 08:51 AM
It looks like it did exactly what it was supposed to. It resized the file down to 82K at 19% quality (which is really poor BTW). Goint to 20% would bump it over 100K and Photoshop doesn't do fractional percentages. But then the Apple file manager says 108KB. There are two things that come to mind, first is that you have EXIF data in the file, normally Save For Web strips this so I don't know why it's there but I'm guessing that the image is 83KB and the EXIF is adding back the additional file size. This may be a difference in the Windows and Mac versions. In the Windows version, the EXIF is stripped in a Save for Web and the file size reported by Windows is identical to the file size reported by Photoshop. Also in the Windows version, the file size is never larger than what was specified, it is always taken to the next lowest increment below the specified file size so if I specify 200K it will go to say 73% and give me a file that is 192K. If I manually take it to 74% it will be say 202KB.

Jim Poor
02-27-2008, 08:57 AM
I have the SFW set to include EXIF data (under the same menu as "optimize to file size" in CS3. I guess that the EXIF is excluded from the file size estimate in the SFW dialog. I'll try again without the EXIF and see what happens. That still doesn't explain the 80k error though, but it's possible that I did something on that occasion. I'll see if I can replicate it.

Jim Poor
02-27-2008, 09:02 AM
Ok, I just went back and did it again without including the EXIF and it still missed, but only by about 2k.

Until sites like PBASE can read the EXIF retained using Save for Web, I suppose it isn't worth much including it unless there is an exif reader out there that could be used to retrieve copyright info.

E.J. Peiker
02-28-2008, 01:34 PM
Ok, I just went back and did it again without including the EXIF and it still missed, but only by about 2k.
It will always miss it by a little since Photoshop does not do fractional percentages in JPEG compression. missing by 2K is very good. Sometimes it will miss by 10K but it should never go over. It will always go as close to the specified limit whithout going over.

Jim Poor
02-28-2008, 01:48 PM
Odd. It went over in this case. but only by about 2k, so I can handle that.

JH Tugs
02-29-2008, 08:12 AM
Perhaps the 'control' test would be to find somebody with whom you do not mind sharing the original file, and seeing if they have the same issues?

Jim Poor
02-29-2008, 08:29 AM
I wouldn't mind that at all. In fact I'm taking the troublesome files with me to Artie's IPT. Al has vowed to get to the bottom of the issue :D