File size when saving JPEG's

Joined
Sep 23, 2006
Messages
1,135
Location
Pennsylvania
In addition to unchecking Embed ICC Profile when saving JPEG’s, is there a way to also omit the EXIF data, such as Photoshop’s Save for Web? I’m trying to get some files down to a certain KB size, but the fixed amount of space taken up by the EXIF data is preventing this.

Thanks.

Barry
 
Joined
Sep 13, 2007
Messages
20,127
Location
Northern VA suburb of Washington, DC
After searching the Help screens, I was unable to find any way to do it.

You might be interested in this link: http://www.controlledvocabulary.com/blog/top-metadata-myths.html The provider of the information accessed at that link is David Reicks, a widely recognized metadata expert. Take a look at Myth #3 for information about the amount of data required to store metadata. Interesting stuff.
 
Joined
Sep 23, 2006
Messages
1,135
Location
Pennsylvania
After searching the Help screens, I was unable to find any way to do it.

You might be interested in this link: http://www.controlledvocabulary.com/blog/top-metadata-myths.html The provider of the information accessed at that link is David Reicks, a widely recognized metadata expert. Take a look at Myth #3 for information about the amount of data required to store metadata. Interesting stuff.

Interesting read. In my case, the images were small - 500 pixels max on a side - and I was trying to get the file size just below 50 KB to avoid further compression by a particular web site.

Today I did a test using 6 identical images of that pixel size. I saved as JPEG using Quality values of 20, 30, 40, 50, 60 and 70. I don't have the actual file sizes in front of me, but they didn't vary much with Quality setting leading me to believe that there was some fixed overhead such as the EXIF data that was present. Even at Quality=20, at which point the image shown obvious degradation, the file size was > 60 KB.

By contrast, I can save such an image in GIMP without EXIF data using Quality=88 there and get a very nice image with file size around 50 KB.

Barry
 
Joined
Apr 25, 2009
Messages
1,304
Location
Kitchener, ON
NX2 really isn't the right tool for what you are trying to do.

Agreed. I haven't been happy with the jpg files when I get to the lower quality settings. Even using the Windows Resize Picture Utility gives far better results for similar file sizes. What I do is set the pixel size of the photo in NX2 and save at maximum quality. Then I select the entire group of files in Windows and resize (meaning compress) them there.

ViewNX2 does have the option to strip all the extra info from a file. There are three check boxes to control what you remove. Unfortunately, this is in the Convert function that isn't available for NEF files that have been edited by CNX2.

I did some testing when creating a jpg file from an unedited NEF file (500 pixels on the long side, no compression). The file size varied from 102kb with everything there, to 80kb with nothing. It didn't matter which single item I had checked, most of the file size increase was because of having one item included. There must be some data structures that are created. The second and third option just fill in the the structures.

I also tested on a jpg file in ViewNX2 that I didn't resize or compress. The file size went up when I removed everything. Go figure.
 
Joined
May 14, 2009
Messages
200
Location
Yakima WA - USA
Here is what I have been doing and maybe there is a a better way. I save my files after converting them in Capture NX2 as Nef's. I then re-open them in Irfanview (free editor) and add any text I want to the picture, then save as jpg at 80%. You can also pick various options in Irfanview and any quality to save.

This may help you get under your size limit. I do all my conversion and sharpening in NX2, just use Irfanview to add text and save as jpg. Irfanview opens Nef's just fine.
 
Joined
May 14, 2009
Messages
200
Location
Yakima WA - USA
Barry - Yes, Irfanview opens Nef's I have processed in Capture NX2 and then re-saved as a Nef. I don't use it for editing, as NX2 is much better, but to add text and save as a jpg, it works great and you can't beat the price. :smile:
 
Joined
Apr 25, 2009
Messages
1,304
Location
Kitchener, ON
Barry - Yes, Irfanview opens Nef's I have processed in Capture NX2 and then re-saved as a Nef. I don't use it for editing, as NX2 is much better, but to add text and save as a jpg, it works great and you can't beat the price. :smile:

Does it open the nef, or does it grab the jpg embedded in it? I have a hard time believing Irfanview is reading all the CNX2 edits to the nef itself. Could be wrong, but no other company seems to have cracked that nut.
 
Joined
Apr 3, 2006
Messages
5,614
Location
Texas
I think Irfanview and Faststone can read the NEF, but unless I am missing something (from Adobe ACR), they know nothing about the XMP file or any edits. They ignore all of that part, and just show the original RAW.
 
Joined
Apr 25, 2009
Messages
1,304
Location
Kitchener, ON
I think Irfanview and Faststone can read the NEF, but unless I am missing something (from Adobe ACR), they know nothing about the XMP file or any edits. They ignore all of that part, and just show the original RAW.

That I can believe.
 
Joined
May 14, 2009
Messages
200
Location
Yakima WA - USA
I don't want to act like an expert here, so maybe you are correct. All I know is that I do my normal editing in NX2, like crop, re-size, apply LCH and even use the retouch brush, sharpen and then save it as a Nef to a different folder then the original.

I can then open the newly saved Nef by selecting the nef file type in the Irfanview open menu and it comes in just as I saved it. If I select jpg, it does not show it. I then add text and then save it as a jpg using the name I want to go with the picture.

This probably creates more questions than answers, so all I can say is try it, the download is free. I have used Irfanview for about 10 years and it opens many different formats. It's one of those little programs I just feel comfortable with and so keep it around. :smile:
 
Joined
Apr 25, 2009
Messages
1,304
Location
Kitchener, ON
I don't want to act like an expert here, so maybe you are correct. All I know is that I do my normal editing in NX2, like crop, re-size, apply LCH and even use the retouch brush, sharpen and then save it as a Nef to a different folder then the original.

I can then open the newly saved Nef by selecting the nef file type in the Irfanview open menu and it comes in just as I saved it. If I select jpg, it does not show it. I then add text and then save it as a jpg using the name I want to go with the picture.

This probably creates more questions than answers, so all I can say is try it, the download is free. I have used Irfanview for about 10 years and it opens many different formats. It's one of those little programs I just feel comfortable with and so keep it around. :smile:

I've used Irfanview in the past, but don't anymore as I have too many choices as it is. I use ViewNX2 (for managing the images) and Picasa (for easy browsing and viewing my selects) mainly. Faststone is another good product that I don't use anymore.

Irfanview has to be extracting the full res jpg that is embedded in the NEF file. It's opening the NEF, but only showing you the embedded jpg. That's easy to do, apparently. As far as I know, Nikon has never given out to other companies the information needed to read the CNX2 editing information in the NEF file itself. Our workflows would be lot simpler if that were the case.
 
Joined
Apr 3, 2006
Messages
5,614
Location
Texas
I don't want to act like an expert here, so maybe you are correct. All I know is that I do my normal editing in NX2, like crop, re-size, apply LCH and even use the retouch brush, sharpen and then save it as a Nef to a different folder then the original.

I can then open the newly saved Nef by selecting the nef file type in the Irfanview open menu and it comes in just as I saved it. If I select jpg, it does not show it. I then add text and then save it as a jpg using the name I want to go with the picture.

This probably creates more questions than answers, so all I can say is try it, the download is free. I have used Irfanview for about 10 years and it opens many different formats. It's one of those little programs I just feel comfortable with and so keep it around. :smile:



Me too, Irfanview is my default viewer for anything.

No dispute, but I don't see that here, and I don't understand why not. If I pick some trash NEF I dont care about, and set wrong White Balance so it is very blue, and crop it to half size, then I expect to see that. However, I only see the unedited original NEF in both Irfanview and Faststone.

I suppose the possibilities include:

1. Irfanview has some option I dont find, to use the XMP data or not. It has properties for NEF under Plugins, one of which is "try to load embedded preview", but I cannot affect my result there.

2. I am using Adobe, and maybe Nikon NX2 and Adobe ACR simply do the XMP in some different way, causing incompatibilities?

Maybe someone here will know?
 
Joined
May 14, 2009
Messages
200
Location
Yakima WA - USA
This is getting interesting. I opened one of my nef's (in NX2) that I had worked on and saved it in my processed nef folder. The only thing I did to it was change the white balance to Sodium Vapor (2700). I then saved it, but put an a at the end of it, so I could distinguish it from the good one.

I then opened it in Irfanview using NEF for file type. It opened and was very blue as it was when I saved it originally. This indicates it is using the nef I re-worked the white balance on. So what do you guys think? I'm confused as usual. :)
 
Joined
Feb 24, 2006
Messages
10,854
Location
Gulu, Uganda
Interesting - if I can make an observation here after reading the thread.
Wayne, it sounds as if you are looking at one file - the original with changes made in NX.
Bruce, you open an original file but after making changes save as a new NEF file. Of course this new NEF will have a jpeg preview embedded with the changes showing. The original file will still look like it first did when viewed with these other applications.

Hope that helps somewhat - and yes wouldn't it be great if we all talked the same language (I really mean the software people there!!).
 

Growltiger

Administrator
Administrator
Joined
Apr 26, 2008
Messages
13,379
Location
Up in the hills, Gloucestershire, UK
First, let's review what is happening.
Omar was exactly right, Irfanview reads the embedded JPG and NOT the raw data.

What you are doing is editing a NEF file in NX2. When you save that file two things happen.
1. Extra data is added into the NEF file which only Nikon can read. It contains all the edit instructions.
2. The embedded JPG in the NEF file is updated.

(By the way Wayne, NX2 doesn't create XMP files, it puts the edit steps into the NEF itself. This is why NX2 edits and Adobe edits completely fail to see each other. Perhaps you were not using NX2 to edit so the embedded JPG was not updated. If you were using Adobe products everything is different.).

Then when you open the file in Irfanview (or Faststone as another example) it reads the embedded JPG. That JPG includes whatever editing changes you made using NX2.

Second, step back for a moment and ask yourself if you want to go on working this way at all. You are using an 8 bit JPG of unspecified quality level for all your subsequent processing. This throws away many of the advantages of taking RAW images in the first place. For example if you then use Photoshop, you cannot work in 16 bit mode, as the image is already only 8 bit. The correct method is to create a 16 bit TIF from NX2, and open that in Photoshop, or whichever editor you want to use.

Your method does allow you some processing advantages over simply taking JPGs from the camera, but I am worried about the degree of JPG compression in the embedded images, I don't know what setting is.

So you could go on using Irfanview, but when you want to edit a file you would need to export a TIF from NX2 instead of editing the file from Irfanview.
 
Joined
May 14, 2009
Messages
200
Location
Yakima WA - USA
Now we're getting somewhere. I should be saving it as a TIF makes sense. That is the way I used to do it when I had a Pentax camera and used Silky Pix as my Raw processor.

Since I save the finished NEF to a different folder, there is no reason I could not save it as a TIF instead of a NEF. Then open it in Irfanview to do my final stuff (adding text and save it as a JPG for the web.

The other option is to save it as a JPG right from NX2, but I wasn't doing that because I was having to open it again in Irfanview to finish it. A good text editor would be on my wish list for the future NX3. Then I could do everything in it. Thanks for the good info.
 

Latest posts

Links on this page may be to our affiliates. Sales through affiliate links may benefit this site.
Nikon Cafe is a fan site and not associated with Nikon Corporation.
Forum post reactions by Twemoji: https://github.com/twitter/twemoji
Forum GIFs powered by GIPHY: https://giphy.com/
Copyright © Amin Forums, LLC
Top Bottom