RAW vs JPEG vs PSD -what's going on?

New Topic
This topic has been archived, and won't accept reply postings.
 Chris Craggs Global Crag Moderator 01 Mar 2020

1) I have been shooting cragshots with a Mavic drone (yes sorry about that) that has a 12mp sensor, I have been shooting RAW. On my disc these are shown as being 24meg - that's the first q - why?

2) I blend two shots and the resulting file is about 40+meg (2 x 24) OK I get that. I export this as a JPEG (at quality 10) and it comes in 6.5meg - if I export it as a PSD it comes in at 210meg - so why is the Photshop file five time bigger than the RAW file it came from?

Anyone have a clue what's going on?

Thanks for looking,

Chris

OP Chris Craggs Global Crag Moderator 01 Mar 2020
In reply to Chris Craggs:

OK - I found the first one, the RAW file creates a copy of itself - doubling the size.

Chris

 jelaby 01 Mar 2020
In reply to Chris Craggs:

If RAW files are 16 bits-per-pixel (or 2 bytes per pixel) as the internet says, 12 million pixels will take 24 million bytes (or 24MB).

For the second, I imagine that PSD files could be 24 bit colour (3 bytes per pixel), and if you have two such layers and a transparency mask or two or something similar, you could easily reach 8 or 10 bits per pixel.

Post edited at 15:31
 HeMa 01 Mar 2020
In reply to jelaby:

This. PSD has the option of containing a lot more info than the source material. It’s also uncompressed unlike RAWs. Hence vastly greater file size. 

OP Chris Craggs Global Crag Moderator 01 Mar 2020
In reply to HeMa:

> It’s also uncompressed unlike RAWs.

Is that correct - I thought the whole point of RAW was that it is uncompressed?

> PSD has the option of containing a lot more info than the source material.

That may be true, but my files are just clean exports of the RAWs with nothing done/added,

Chris

 Frank R. 01 Mar 2020
In reply to Chris Craggs:

You can't directly compare apples and oranges - megapixelsmegabytes, or file size (on disk) x image size (opened in Photoshop).

For a 12MP camera:

JPEG - 1 byte per colour (8 bits) - image size 1 byte x 3 colours (RGB) x 12M pixels (36MB image size). Lossy file compression, file size varies with compression and contents (bland sky = small file, detailed forest = bigger file).

RAW - usually 2 bytes (16 bits) per colour - image size 2 bytes x 3 colours x 12M pixels (72MB). But file size is usually only 1/3 of that, because the sensor only has 1/3 red pixels, 1/3 green pixels, 1/3 blue pixels (grossly simplified) and software interpolates each pixel's full RGB colour from its neighbours. May contains an additional JPEG inside the file for faster viewing. Slightly over 24MB would be a typical 12MP RAW file size.

PSD - could be 2 bytes or 3 bytes (even 4 bytes) per colour, no file compression by default (can use lossless compression for around 30% smaller file size & much longer saving time). Without compression and full RGB colour for every pixel, image size = file size, i.e. 72MB at 16 bits or 108MB at 24 bits. Add some layers and it can easily double or more.

Hope that helps

OP Chris Craggs Global Crag Moderator 01 Mar 2020
In reply to Frank R.:

Cheers, that does help, even if only to inform me of how little I know about this end of things - much appreciated, I need to do some reading.

I find it odd/surprising I can have two images open on my screen - one JPEG on PSD that, at 100% look identical and yet one file is 50x bigger than the other - I assume there is a good reason for the humongous files.

Cheers again,

Chris

 jelaby 01 Mar 2020
In reply to Chris Craggs:

It appears that RAW is losslessly compressed, so although it is compressed, no information is lost (cf. JPEG which is lossily compressed, which means you can't get back to exactly the original  image from a JPEG. I had misread the internet, and it is 16 bits per channel as Frank says, which would give 72MB uncompressed for 12 million pixels.

I had no idea that a camera that is advertised as 12 megapixels actual only has 4000 (ish) of red, green or blue sensors as Frank says. But I do know that once lossless compression is involved, the actual file size will be dependent on the actual content of the image, and the details and parameters of the compression algorithm, which makes predicting file sizes very difficult indeed.

Post edited at 18:49
 HeMa 01 Mar 2020
In reply to Chris Craggs:

> I find it odd/surprising I can have two images open on my screen - one JPEG on PSD that, at 100% look identical and yet one file is 50x bigger than the other - I assume there is a good reason for the humongous files.

That is the possibility of adding more information going for PSD... and even if you add nothing the place holder is there, so takes place and those values need also space -> humongous files, really useful for really a lot of tweaking. Perhaps not relavant for ya.


Oh and RAWs are lossless (unlike JPEG, which is just that), but compressed =/ information lost... other vise you wouldn't able to ZIP something and later extract it in working order .

So on a RAW, all the information from the cell is there, but it can be compressed to take less space. On JPG, same thing, except the key to extract the full information is chucked in the bin. So what you see is all ya get on JPG... With RAW, you might tweak your WB or highlights curve and get something resurrected from the the blacks.

 Frank R. 01 Mar 2020
In reply to Chris Craggs:

Ah, but then again, JPEG is lossy compression. Like the same music album is much smaller in MP3 (let's say 65MB) than on audio CD (650MB), but lower quality. And the JPEG has only one byte per colour channel, while the PSD could have one to several bytes per colour channel, which could make another difference.

But you might still be confusing the file sizes on disk versus image sizes - if you have "same" 10MB JPEG and 100MB PSD photos (different file size) and open them in Photoshop (or display them on screen in any other software) - with all other things, like bytes per colour, being equal - they will take up the exact same space in memory (same image size). Because the JPEG had to be uncompressed first to display it.

I wouldn't worry about it too much, though. Unless you are doing some pro work or printing really big or the photo is not the final product (e.g. in graphics design), I'd just save the final photo after all the edits as JPEG at highest quality (i.e. 12 in Photoshop) and keep the original RAWs for possible redoing or archive. I have only seldom had the need to keep the big edited PSD files with full layers, usually just after heavy retouching (portraits, advertising) and if the client required it.

OP Chris Craggs Global Crag Moderator 01 Mar 2020
In reply to all:

Thanks for that, some very useful stuff in there - I may need to delve deeper - when I get a bit of time,

Chris

 Frank R. 01 Mar 2020
In reply to jelaby:

> I had no idea that a camera that is advertised as 12 megapixels actual only has 4000 (ish) of red, green or blue sensors as Frank says

Well, the 12MP sensor still has 3000x4000 single pixels in a grid and the final photo has 12 megapixels with full colour information, just colour interpolated from the neighbours (again, it's slightly more complicated, but look up Bayer colour filter array if you want, it's more like 1/2 green and 1/4 red and blue usually). It's computer magic The human eye functions on a similar principle and in practice, it doesn't really matter (unless you are doing some scientific work like sensors for satellite imaging).

 Blue Straggler 01 Mar 2020
In reply to Chris Craggs:

Irrelevant tangent from me. 

If I don’t take care I can sometimes create a single 3D image file 220Gb in size, based on data from a 16MP image sensor 😃

Post edited at 20:48
In reply to Frank R.:

I've only ever kept two types of image files (with a few exceptions): 1. Photoshop psds, as a masters, essential if I want to keep all the various working layers. 2. Highest quality (i.e.10) jpegs of the flattened PSD. You can always go back to the PSD master if the oen you're working on gets corrupted. Only if it's something really historically important have I kept it as a TIFF as well - but that's really simply a way of keeping my paranoia at bay. Surely Photoshop's fine as a master, because that's what we'll always be working on (well, copies of) if it gets difficult or complicated?

Post edited at 21:33
2
 JDal 02 Mar 2020
In reply to Gordon Stainforth:

I keep RAW masters as you lose some info when going to PSD , in particular the sensor matrix data on the RAW  file is "decoded" into RGB values for PSD. This loses (1) some lattitude in fixing blown whites/getting into shadow channels/noise reduction and (2) Makes White Balance much harder to mess around with.  If I've done a boatload of work in PSD on an image, for example trimming a couple of inches off wor lasses waistline, I also save the PSD alongside the RAW. I wouldn't bother with TIFF at all, I'm sure there's nothing in there which isn't in the PSD and they are bloody huge.

 planetmarshall 02 Mar 2020
In reply to Chris Craggs:

> Anyone have a clue what's going on?

Typically, a Digital Camera only has a single sensor which captures intensity values, from which you have to get a full colour image. In order to do this, the most common technique is a Bayer Mosaic, in which each pixel in the sensor captures an intensity level for one of three colour channels: Red, Green and Blue. There are usually twice as many Green pixels, as the human eye is more sensitive to this part of the spectrum. 

The Bayer Mosaic is what you get in your RAW file, together with various bits of information about the camera, maybe some location information, and some colour calibration information which is used to convert the Raw sensor information into Colour.

How much space is required to store the RAW image depends on the sensitivity of the sensor, but typically 2 bytes per pixel are used.

So a Raw image with a 12Mp sensor with 2 bytes per pixel will be on the order of ~24Mb. Some Raw storage formats (such as DNG) can compress the Bayer Mosaic in such a way as to not lose any information so it may in practice be smaller than this.

When you open the RAW file in Photoshop, it is converted from the Bayer Mosaic format to a full colour image. The Bayer Mosaic only has one value per pixel, whereas a Colour image has three, so to fill in the missing information some sort of interpolation is used ( a process known as demosaicing ).

So uncompressed, after demosaicing we have 12Mp with 6 bytes per pixel or on the order of ~72Mb. Your PSD file can end up vastly larger than this if you use multiple layers.

The details of the JPEG compression algorithm are a bit detailed to go into here, but the gist of it is that the majority of information in the original image is in high-frequency detail that is largely imperceptible to the human eye. The JPEG encoder removes a lot of this detail enabling the image size to be much smaller - depending on how much detail the end user is willing to sacrifice.

In reply to Frank R.:

The arrogance of some people is breathtaking. I said rather simply and gently how I store pictures as a professional photographer and I get a Dislike. I wonder just how many commercially very successful and award-winning photographic books that Disliker has produced? That creepy Dislike button again. Several notches more creepy than spouting critical judgements while cringing behind a pseudonym. And that's bad enough.

4
 Frank R. 02 Mar 2020
In reply to Gordon Stainforth:

And why are you replying with that complain to me? I am not in the habit of handing out likes or dislikes left and right, especially on a somewhat obscure technical matter and personal workflow, which can differ a lot even between professionals. In other words - it wasn't me

I'd just ignore it - it's only noise. It comes with the (online) territory. Personally, I'd prefer ditching the like/dislike altogether, as it in my opinion doesn't encourage discussion much (although it can save time with not reading the overly hateful political diatribes in The Pub forum).

I'd just say everybody's workflow can differ, even among pros. Especially if you compare different niches - photojournalism, editorial, advertising, portraiture. I know a few PJs who haven't bothered with RAWs at all nearly to this day - perhaps out of habit as everything was so slow with first DSLRs two decades ago. On the other hand, I know few others who shoot RAW+JPEG even for some daily sports, sometimes I did as well (filing the JPEGs via WiFi/Ethernet immediately and keeping the RAWs for possible exhibition keepers). I don't use PSDs as masters possibly nearly as much as you, since most of my work doesn't rely on layers and heavy retouching. But I can understand perfectly why somebody else would work differently. De gustibus non est disputandum

In reply to Frank R.:

>I don't use PSDs as masters possibly nearly as much as you, since most of my work doesn't rely on layers and heavy retouching. But I can understand perfectly why somebody else would work differently. De gustibus non est disputandum

BTW (as you probably know from my various photographic books?), I believe in using an absolute minimum of 'retouching'.  I generally hate shots that have been heavily re-worked in PS. But just about everything needs some grading work (starting with 'Levels', often locally = to the 'dodging and burning' we used to do in the darkroom) and repair of blemishes (= to dust and scratches in days of photography). What I'm saying is more of a statement than a complaint. I can't see the point of multiple kinds of masters. However little work a shot will require, the photographer will have to go back to a PSD (unless using a modern alternative like Acorn or GIMP), and that seems a good enough starting point to me. Am I unusual in hating to use up GBs of memory unnecessarily?

Post edited at 21:35
 FactorXXX 02 Mar 2020
In reply to Gordon Stainforth:

> BTW (as you probably know from my various photographic books?), I believe in using an absolute minimum of 'retouching'.  I generally hate shots that have been heavily re-worked in PS. But just about everything needs some grading work (starting with 'Levels', often locally = to the 'dodging and burning' we used to do in the darkroom) and repair of blemishes (= to dust and scratches in days of photography). What I'm saying is more of a statement than a complaint. I can't see the point of multiple kinds of masters. However little work a shot will require, the photographer will have to go back to a PSD (unless using a modern alternative like Acorn or GIMP), and that seems a good enough starting point to me. Am I unusual in hating to use up GBs of memory unnecessarily?

Surely the master is the original RAW file?
 

In reply to FactorXXX:

No, my point – the way I do it – is that I don't store any RAW files. I save everything that I rate as publishable as a Photoshop file. My simple logic is that if a shot is publishable it's bound to go thru Photoshop anyway. I really can't believe that Photoshop (keeping a shot as a raw file) can degrade a picture in any serious way. Otherwise, surely, Photoshop would have gone out of business years ago? In the two and a half decades I've used PS, nothing has made me remotely uneasy about them ... except the amount they now charge for using it.

PS. I worked as a successful professional photographer for about 25 years from 1985 onwards, but have dropped it completely for the last decade, so realise that my opinions may no longer be valid.

Post edited at 23:10
1
 Frank R. 02 Mar 2020
In reply to Gordon Stainforth:

Re: burning, dodging and all other edits, for a long time (if not retouching a fashion shoot or food or something like that) - I mostly just do my edits inside the ACR module, where they are all saved inside the RAW master as recipes. For all my PJ work that’s usually quite enough, with the bonus that I can undo any edits or redo them easily. Obviously, workflows can be quite different

Post edited at 23:09
 FactorXXX 02 Mar 2020
In reply to Gordon Stainforth:

> No, my point – the way I do it – is that I don't store any RAW files. I save everything that I rate as publishable as a Photoshop file. My simple logic is that if a shot is publishable it's bound to go thru Photoshop anyway. I really can't believe that Photoshop (keeping a shot as a raw file) can degrade a picture in any serious way. Otherwise, surely, Photoshop would have gone out of business years ago? In the two and a half decades I've used PS, nothing has made me remotely uneasy about them ... except the amount they now charge for using it.

Most people see RAW files as being the equivalent of negatives or slides. To not keep them seems a little strange as I assume you wouldn't put negatives or slides in the bin.
 

In reply to Frank R.:

Frank ... I was never a serious digital photographer, so feel quite/very out of my depth with all the latest developments. For over a decade I heaved a quite heavy Hasselblad camera all over our hills and mountains, plus its even heavier lenses and a tripod, and sometimes even a 5 x 4 Wista plate camera. It was just a totally different ball game, physically. And psychologically, because you had no idea what your shots looked like/how publishable they were until you got home. So many times after a location trip to the Highlands, I'd take the film straight to the labs in Derby before I'd even got home ... and then wait for an hour and a half, more or less biting my fingernails in suspense.  Then you'd lay the strips of 2 ¼ trannies on their lightbox. Terrifying. Sometimes really dazzingly lovely, others, shockingly disappointing.

In reply to FactorXXX:

> Most people see RAW files as being the equivalent of negatives or slides. To not keep them seems a little strange as I assume you wouldn't put negatives or slides in the bin.

I've kept all my original reversal transparencies, 35mm, 645, 6x6, 6x9, and 5x4 inch plates. And what a pain that is. Vast amounts of storage shelves. But far worse is the whole miscellany of old 35mm boxes of transparencies. Sometimes it really is a bit like looking for a needle in a haystack.

1
In reply to FactorXXX:

For the last decade, having spent quite a big chunk of my life as a professional photographer (after leaving the film industry in 1986), I've completely turned my back on it. It's a bit hard to explain. It's mostly about just wanting to be in the place without always thinking of photography/what will make a great photograph? And all the hassle of having to carry all that gear with you (in the days of film, quite heavy). Now, I let my partner take any pictures on her iPhone. Very occasionally, I borrow it off her to take a shot or two. It's also about moving on in life, I think. Life just does not stay the same, and as you get older, you have to adjust and take up/ develop other interests. That's just a complicated way of saying life is short.

 HeMa 03 Mar 2020
In reply to Frank R.:

> Re: burning, dodging and all other edits, for a long time (if not retouching a fashion shoot or food or something like that) - I mostly just do my edits inside the ACR module, where they are all saved inside the RAW master as recipes.

Yup, most content creators are using stuff like Lightroom and such to both edit (and non destructive "recipes") and manage their digital assets. Most of the normal fixes can be done in said tools. PS only comes out for proper or difficult re-touching (cloning out an annoying person  from the skyline can often be done whit good enough results in LR or similar).

So while PS still has use, majority do not use of as their main tool... In fact, I recall PS is now used more and more in science (e.g. fluid dynamics), albeit most likely still not at the same numbers as by photogs.

 Frank R. 03 Mar 2020
In reply to Gordon Stainforth:

> It's a bit hard to explain. It's mostly about just wanting to be in the place without always thinking of photography/what will make a great photograph?

I can definitely understand that!

 Frank R. 03 Mar 2020
In reply to HeMa:

I think there are much better proper digital asset management tools than Lightroom, like Photomechanic 6 Plus

I mostly use Adobe Camera Raw inside PS instead of Lightroom, it's usually much faster to ingest and cull the photos inside Photomechanic and convert the keepers with ACR. Actually, I'd prefer to have something like ACR (non-destructive editing and saving the edits into XMP sidecar files) but without the subscription (I don't need Lightroom and all the other "goodies" that are in the Creative Cloud monthly price)...

But it's true that most of the edits I do are just inside the RAW file now (with ACR, which has the same tools as LR), without much work at all on the converted photo in Photoshop (unless it's retouching portraits). Non-destructive editing is great! Especially since it simplifies archiving a lot.

 HeMa 03 Mar 2020
In reply to Frank R.:

Yup, I think I wrote LR or similar in the orig reply.

LR just happens to be the most commonly know (and afaik still has the best "asset" management tool in an app). 

That being said, as a hobbyist I'm not keen on the subscription model by Adobe (so still use LR5), and that the reason I'm evaluating and most likely migrating to darktable, which happens to be free and open source. From the small fiddling around I did during the week-end, more than enough for a hobbyist like myself. I do still think that LR has the best asset management tool available, but there are ways around that, like you are using.

 Blue Straggler 03 Mar 2020
In reply to Gordon Stainforth:

> The arrogance of some people is breathtaking

> I wonder just how many commercially very successful and award-winning photographic books that Disliker has produced? 

> cringing behind a pseudonym. And that's bad enough.

Gordon, you are above this. 

 Frank R. 03 Mar 2020
In reply to Gordon Stainforth:

> For over a decade I heaved a quite heavy Hasselblad camera all over our hills and mountains, plus its even heavier lenses and a tripod, and sometimes even a 5 x 4 Wista plate camera. 

Ouch! Especially with the Wista - did you lug that field cam on Cuillin too? At least you used Hasselblad and not a Pentax 6x7 - I think that one was around twice the weight body only (and kicked like a mule with that huge mirror)  

The suspense of waiting whether the E6 rolls or sheets would come out well and hoping the lab wouldn't have a "purple monday" moment... Yes

In reply to Frank R.:

> Ouch! Especially with the Wista - did you lug that field cam on Cuillin too? At least you used Hasselblad and not a Pentax 6x7 - I think that one was around twice the weight body only (and kicked like a mule with that huge mirror)  

No, I never took the Wista onto the Cuillin Ridge. I simply used it for long shots of the Cuillin, only one of which got into the book (the title page, double-page spread). What was so tough about that camera was that you needed your heaviest sturdiest tripod, and then a windbreak. I had this made by Wild Country. It was basically the back end of a tent, and you could just about stand up in it with the camera, out of the wind. It worked well but took several minutes to put up. I also used two very good Fuji rangefinder cameras: the 645 and 690. Both excellent, with superb lenses. But the real workhorse was the Blad. And that weighed quite a lot with the three lenses (the 50 and 150mm very heavy) plus a teleconvertor. On the ridge I would typically have the Blad with the 50mm, and also the 80mm, plus a Nikon FM2, which I hardly used at all. Or the Blad with the 80mm and the Fuji 645. There was then the spotmeter, a prism finder (not usually taken on the ridge), a mini-tripod, and a basic Manfrotto tripod. Spare clothing, food, and water. Map/s. Guidebooks as necessary. Various filters. At least six rolls of unexposed Fuji film stock in a waterproof container, which also held the exposed rolls. (And sometimes even some climbing gear: a couple of slings and krabs, and a few nuts.) And guy ropes to anchor the Blad tripod in an exposed windy position. I would very much select the camera gear for the days shoot - typically one or two main projects, and then of course take 'whatever else happened'.

> The suspense of waiting whether the E6 rolls or sheets would come out well and hoping the lab wouldn't have a "purple monday" moment... Yes

It was terrible. Once, on my Lakes book, I looked at a whole 18-day shoot and saw at a glance that though nothing was bad, nothing was really quite good enough to be publishable. The three categories were just so different: NG, publishable, and published (i.e. the shots actually chosen for the final book).

 ChrisJD 04 Mar 2020

This thread reminds me of the Python Four Yorkshire Men sketch.

In reply to ChrisJD:

Well, it was a bit like that sometimes, when some of us old school (film) landscape photographers, like John Beatty etc, got together. But I walked away from it all two decades ago, and now enjoy digital photography using tiny cameras enormously. But it no longer plays much part in my life. Other creative things have beckoned ...

 Frank R. 04 Mar 2020
In reply to ChrisJD:

Oohhh you were so lucky to have a TV to watch Monty Python on! We used to watch them from our cardboard shoebox in the middle of the road through the neighbours' windows! No sound came through, we had to lip-read to even understand the sketches!


New Topic
This topic has been archived, and won't accept reply postings.
Loading Notifications...