Pages: [1]   Go Down

Author Topic: The size of the JPEG file when you save for web (questions updated, please help)  (Read 2834 times)

Heterodim

  • Newbie
  • *
  • Offline Offline
  • Posts: 10

1. I found that, after I save a 16-bit photo for web, the size of the resulting JPEG file is smaller than that of the JPEG file of the same photo converted to 8-bit before I save for web (see pictures below).

Anyone know the reason of this?

2. Also the size of JPEG produced by "save for web" option sometimes is much smaller than the original one produced by the camera.
for example, the photo in picture 1 has a size almost the same as before, but the size of the photo in picture 2 becomes much smaller than the original size (which is around 15mb).

I think the difference of the sizes of these two photos is related to the color and details, but anyone know more about this? And, what does photoshop do to reduce the size of the second photo?

Many thanks!

« Last Edit: November 22, 2016, 07:12:29 am by Heterodim »
Logged

trshaner

  • Newbie
  • *
  • Offline Offline
  • Posts: 33
Re: The size of the JPEG file when you save for web
« Reply #1 on: November 21, 2016, 08:53:07 am »

I can confirm what you are seeing if the Save for Web panel does not have 'Convert to sRGB' checked. I assume you want the image file converted to sRGB correct? Try checking that option and the files size should be the same.
Logged

Heterodim

  • Newbie
  • *
  • Offline Offline
  • Posts: 10
Re: The size of the JPEG file when you save for web
« Reply #2 on: November 21, 2016, 12:16:51 pm »

I can confirm what you are seeing if the Save for Web panel does not have 'Convert to sRGB' checked. I assume you want the image file converted to sRGB correct? Try checking that option and the files size should be the same.

Thank you for the reply. I'm sorry that I wrote the wrong problem in the post, and now I have changed it.
Logged

trshaner

  • Newbie
  • *
  • Offline Offline
  • Posts: 33
Re: The size of the JPEG file when you save for web
« Reply #3 on: November 21, 2016, 01:09:52 pm »

The 'Save for Web' JPEG file size should be the same whether the open PS document is in 16bits/channel or 8bits/cbannel mode. Again, this assumes you have 'Convert to sRGB' checked in both cases. If you're not seeing this then there is something wrong.
Logged

Heterodim

  • Newbie
  • *
  • Offline Offline
  • Posts: 10
Re: The size of the JPEG file when you save for web
« Reply #4 on: November 22, 2016, 07:03:07 am »

The 'Save for Web' JPEG file size should be the same whether the open PS document is in 16bits/channel or 8bits/cbannel mode. Again, this assumes you have 'Convert to sRGB' checked in both cases. If you're not seeing this then there is something wrong.

Thanks! Please see the pictures I added, it seems that there is a small difference, and I finally remembered what I wanted to ask in the beginning as mentioned in my second question.
Logged

trshaner

  • Newbie
  • *
  • Offline Offline
  • Posts: 33

You've changed your original post text three-times now, which produces a disconnect in the reply string. I suggest putting your additional questions in the next reply including posting images. This way anyone landing here will better understand the thought processes in the reply thread.  ;)

We're talking about two distinct issues: 1) Differences in file size when using 'Save for Web' with 16bit vs 8bit Open Image bit depth. 2) Differences in file size dependent on image type.)

1) If you're using PS CC please see this Blog post: https://blogs.adobe.com/crawlspace/2015/06/save-for-web-in-photoshop-cc-2015.html

2) Please see this article on JPEG File Size. It's titled LR, but applies directly to PS as well since they share the same JPEG converter. The only difference is that LR uses 0-100 Quality and PS 0-12 Quality settings. This is explained in the article: http://regex.info/blog/lightroom-goodies/jpeg-quality

I used 'Save for Web' in PS CC2017 with both original 16bit open image, changed the mode to 8bit, and the file sizes are pretty close. The differences between 'Save for Web' and 'Save As' are probably due to slight differences in the JPEG engine and file Metadata. I'm not sure why the 2nd image you posted shows a larger difference (6.21 vs 7 MB). Again it may be due to JPEG engine differences or an issue with your PS installation such as a corrupt Preferences file. If you can post that original file to a file sharing site I'll be glad to investigate further. BTW- What version of PS are you using?
« Last Edit: November 22, 2016, 01:32:23 pm by trshaner »
Logged

Heterodim

  • Newbie
  • *
  • Offline Offline
  • Posts: 10

You've changed your original post text three-times now, which produces a disconnect in the reply string. I suggest putting your additional questions in the next reply including posting images. This way anyone landing here will better understand the thought processes in the reply thread.  ;)

We're talking about two distinct issues: 1) Differences in file size when using 'Save for Web' with 16bit vs 8bit Open Image bit depth. 2) Differences in file size dependent on image type.)

1) If you're using PS CC please see this Blog post: https://blogs.adobe.com/crawlspace/2015/06/save-for-web-in-photoshop-cc-2015.html

2) Please see this article on JPEG File Size. It's titled LR, but applies directly to PS as well since they share the same JPEG converter. The only difference is that LR uses 0-100 Quality and PS 0-12 Quality settings. This is explained in the article.

I used 'Save for Web' in PS CC2017 with both original 16bit open image, changed the mode to 8bit, and the file sizes are pretty close. The differences between 'Save for Web' and 'Save As' are probably due to slight differences in the JPEG engine and file Metadata. I'm not sure why the 2nd image you posted shows a larger difference (6.21 vs 7 MB). Again it may be due to JPEG engine differences or an issue with your PS installation such as a corrupt Preferences file. If you can post that original file to a file sharing site I'll be glad to investigate further. BTW- What version of PS are you using?

Thank you, trshaner. I'm using PS CC 2015. I checked the blog post but they didn't discuss on the file size. I think the reason should be what you said.
I found that they have a new feature "export as", it seems that it is now not better than save for web (since they will remove save for web if export as is better?)

I guess you forgot to add a link to the article in your response to my second question.

 
Logged

trshaner

  • Newbie
  • *
  • Offline Offline
  • Posts: 33

In that article it mentions that Adobe has no intention of removing the 'Legacy Save for Web module' until ALL of its functions have been replaced in the new 'Export As' module. The primary difference is that Save for Web doesn't include things like camera EXIF in metadata, which is really only significant when outputting small dimension image files. How are you using the Save for Web JPEG files, what size, other concerns, how posted, etc.

The Save for Web module also allows you to preview the image to determine the affect of the settings (Quality, etc.). I've placed the link to the JPEG article in my last reply (sorry). In the article it explains that there are differences in the PS 'Save As' versus 'Save for Web' Quality settings, but it should help you understand how the Quality setting affects different image subject types.

Logged

Heterodim

  • Newbie
  • *
  • Offline Offline
  • Posts: 10

In that article it mentions that Adobe has no intention of removing the 'Legacy Save for Web module' until ALL of its functions have been replaced in the new 'Export As' module. The primary difference is that Save for Web doesn't include things like camera EXIF in metadata, which is really only significant when outputting small dimension image files. How are you using the Save for Web JPEG files, what size, other concerns, how posted, etc.

The Save for Web module also allows you to preview the image to determine the affect of the settings (Quality, etc.). I've placed the link to the JPEG article in my last reply (sorry). In the article it explains that there are differences in the PS 'Save As' versus 'Save for Web' Quality settings, but it should help you understand how the Quality setting affects different image subject types.

I will check the article. Many thanks!
Logged

Redcrown

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 507

I don't use "Save for Web" or "Export As", but this sounded like an interesting challenge so I did some tests.

I ran Save for Web on 3 different images from 3 different starting points of each image. The 3 starting points were:

1. ProPhoto and 16 bit.
2. sRGB and 16 bit
3. sRGB and 8 bit.

In SFW I used a quality of 80, Optimized, Embedded Color Profile, Convert to sRGB, and Metadata:All.

Suprisingly, my resulting jpeg files sizes were inconsistent. Sometimes the Prophoto 16bit starting point created a smaller jpeg. Sometimes not. That leaves only one other variable, and that is image content.

One of my images was a dull, flat landscape with lots of blank sky. The colors did not challenge the colorspace conversion. Although the image was converted from raw into Prophoto, the colors fit well within sRGB. The blank sky offered much opportunity for jpeg compression.

The other two images were "synthetic" images commonly used to test colorspace conversions and printing gamuts. One is called the "Granger Rainbow". The other is "Bill Atkinson's 28 balls". Google those names for more info. These 2 images, in Prophoto, contain RGB values that are way outside the sRGB colorspace.

When Save for Web (and Export As) is given a Prophoto 16bit image and told to make an sRGB 8bit jpeg it has to do three things.

1. Convert the colorspace
2. Convert the bit depth
3. Compress the values.

I think the key question here is in what sequence these three steps are done. I would think they are done in the sequence I've shown, but now I'm not sure. I challenge others participating in this thread to perform similar tests using images that do and do not cause significant changes in the colorspace conversion, and then help think this through.

Consider that converting from Prophoto to sRGB will cause some values to be moved closer together. Values that are closer together are more likely to get compressed. Bit depth conversion simply truncates the least significant bits. Some RGB values have nothing in those bits to begin with, so truncating them has no impact. In both cases, the jpeg compression will vary depending on when it is done and the range of starting values.
Logged

Heterodim

  • Newbie
  • *
  • Offline Offline
  • Posts: 10

I don't use "Save for Web" or "Export As", but this sounded like an interesting challenge so I did some tests.

I ran Save for Web on 3 different images from 3 different starting points of each image. The 3 starting points were:

1. ProPhoto and 16 bit.
2. sRGB and 16 bit
3. sRGB and 8 bit.

In SFW I used a quality of 80, Optimized, Embedded Color Profile, Convert to sRGB, and Metadata:All.

Suprisingly, my resulting jpeg files sizes were inconsistent. Sometimes the Prophoto 16bit starting point created a smaller jpeg. Sometimes not. That leaves only one other variable, and that is image content.

One of my images was a dull, flat landscape with lots of blank sky. The colors did not challenge the colorspace conversion. Although the image was converted from raw into Prophoto, the colors fit well within sRGB. The blank sky offered much opportunity for jpeg compression.

The other two images were "synthetic" images commonly used to test colorspace conversions and printing gamuts. One is called the "Granger Rainbow". The other is "Bill Atkinson's 28 balls". Google those names for more info. These 2 images, in Prophoto, contain RGB values that are way outside the sRGB colorspace.

When Save for Web (and Export As) is given a Prophoto 16bit image and told to make an sRGB 8bit jpeg it has to do three things.

1. Convert the colorspace
2. Convert the bit depth
3. Compress the values.

I think the key question here is in what sequence these three steps are done. I would think they are done in the sequence I've shown, but now I'm not sure. I challenge others participating in this thread to perform similar tests using images that do and do not cause significant changes in the colorspace conversion, and then help think this through.

Consider that converting from Prophoto to sRGB will cause some values to be moved closer together. Values that are closer together are more likely to get compressed. Bit depth conversion simply truncates the least significant bits. Some RGB values have nothing in those bits to begin with, so truncating them has no impact. In both cases, the jpeg compression will vary depending on when it is done and the range of starting values.

Thank you for the testing and discussion. The results are confusing, hope we can figure it out.
Logged

trshaner

  • Newbie
  • *
  • Offline Offline
  • Posts: 33

I'm not seeing a large difference in where the color space and bit depth conversion is performed with 'Save for Web' or 'Save As.' But it's obvious that 'Save for Web' uses a different JPEG conversion engine than 'Save As.' To see the most marked differences try Exporting using 'Save for Web' with Quality 0 and 'Save As' with Quality 0 using a ProPhoto RGB 16 bit image without conversion to sRGB. Open both JPEG files and compare at Fit and 100% views. Do you see differences. Which one looks best?

The following JPEG files were all created using the same ProPhoto RGB 16bit open image file except where noted otherwise.





Logged
Pages: [1]   Go Up