RAW vs JPG


Nikon F5 brochure- mentions a Database and microcontroller used for Matrix Metering. I suspect more like a look-up table based on multiple indexes. It would be fun to have the code.
This is about the same period that my Wife used a Neural Network card in a PC, the card used 8 Weitek processors.
Nikon could have had an ASIC made to implement a neural network based exposure system. The brochure does not mention an ASIC.
 
Custom DNG processor the the Leica M8, shooting RAW mode and using M8RAW2DNG to produce 14-bit pixels.

Use a Red or Orange filter to eliminate Blue from the image. The Blue channel gets IR only, about 5%~10% efficiency.
Use Histogram Equalization to boost the Blue and Green channels to the same level as Red.
14-bit pixels allow this kind of boost, the crappy 8-bit DNG would look like a contour map.

Swap channels using Tags. Lightroom understands the Tag swap, but most raw processors do not.
View attachment 4839885View attachment 4839886View attachment 4839887View attachment 4839888

SUBROUTINE COLORMOSAIC( IMAGE, COLUMNS, ROWS)
IMPLICIT NONE
C IMAGE GENERATED USING EQUALIZATION.
C 1) COMPUTE HISTOGRAM FOR ALL THREE CHANNELS.
C 2) INTEGRATE ARE UNDER HISTOGRAM AND NORMALIZE.
C 3) EQUALIZE BLUE AND GREEN TO RED.
INTEGER* 4 COLUMNS, ROWS
INTEGER* 2 IMAGE( COLUMNS, ROWS)
INTEGER* 4 COLUMN, ROW
C+++ BEGIN DOS I/O FUNCTION CODES.
INTEGER* 4 MAXPIXEL
PARAMETER ( MAXPIXEL= Z'3FFF')
C HISTOGRAM. STRONGEST WILL BE SET THE THE CHANNEL THAT IS THE FIRST TO
C REACH A THRESHOLD
REAL* 8 INTEGRATION_CUTOFF
PARAMETER ( INTEGRATION_CUTOFF= 0.95D0)
INTEGER* 4 BLUECHANNEL, GREENCHANNEL, REDCHANNEL
PARAMETER ( BLUECHANNEL= 1, GREENCHANNEL= 2, REDCHANNEL= 3)
INTEGER* 4 HISTOGRAM( 0: MAXPIXEL, 3)
INTEGER* 4 BLUEHIST( 0: MAXPIXEL), GREENHIST( 0: MAXPIXEL)
INTEGER* 4 REDHIST( 0: MAXPIXEL), CUTOFF( 3), STRONGEST
EQUIVALENCE ( HISTOGRAM( 0, BLUECHANNEL), BLUEHIST)
EQUIVALENCE ( HISTOGRAM( 0, GREENCHANNEL), GREENHIST)
EQUIVALENCE ( HISTOGRAM( 0, REDCHANNEL), REDHIST)
C INTEGRATE THE CURVE.
REAL* 8 IMAGETOTAL( 0: MAXPIXEL, 3)
REAL* 8 BLUETOTAL( 0: MAXPIXEL), GREENTOTAL( 0: MAXPIXEL)
REAL* 8 REDTOTAL( 0: MAXPIXEL)
EQUIVALENCE( IMAGETOTAL( 0, BLUECHANNEL), BLUETOTAL)
EQUIVALENCE( IMAGETOTAL( 0, GREENCHANNEL), GREENTOTAL)
EQUIVALENCE( IMAGETOTAL( 0, REDCHANNEL), REDTOTAL)
C MAP BLUE TOTALS TO GREEN TOTALS, SHOULD EQUALIZE THE HISTOGRAM.
REAL* 8 GAINCURVE( 0: MAXPIXEL)
INTEGER* 2 BYTES, HANDLE, STATUS, LENGTH, EXCHANGE
REAL* 8 SUMGREEN, SUMBLUE, AVERAGE_GREEN, AVERAGE_BLUE, GAIN
INTEGER* 4 PIXELS, MINBLUE, MINGREEN, MAXBLUE, MAXGREEN
INTEGER* 4 MINRED, MAXRED
INTEGER* 4 I, J, K, L
C FORTRAN METHOD OF GETTING LOW-ORDER WORD FROM A 32-BIT VALUE.
INTEGER* 4 BIGVALUE
INTEGER* 2 VALUE( 2)
C EXTERNALS.
INTEGER* 2 MOD
REAL* 8 DFLOAT, DMIN1
EQUIVALENCE ( BIGVALUE, VALUE)
WRITE( *, *) ' COLUMNS= ', COLUMNS, ', ROWS= ', ROWS
C EQUALIZE BLUE AND GREEN CHANNELS TO RED. CAN CHANGE LATER TO USE
C THE STONGEST CHANNEL.
SUMBLUE= 0.0D0
SUMGREEN= 0.0D0
MINBLUE= 32768
MINGREEN= 32768
MINRED= 32768
MAXGREEN= 0
MAXBLUE= 0
MAXRED= 0
PIXELS= COLUMNS* ROWS
C INITIALIZE ARRAYS.
DO 1 I= 0, MAXPIXEL
BLUEHIST( I)= 0
GREENHIST( I)= 0
REDHIST( I)= 0
BLUETOTAL( I)= 0.0D0
GREENTOTAL( I)= 0.0D0
REDTOTAL( I)= 0.0D0
GAINCURVE( I)= 0.0D0
1 CONTINUE
C COMPUTE HISTOGRAMS AND FIND MAX/MIN OF EACH CHANNEL.
DO 2 J= 2, ROWS, 2
DO 2 I= 2, COLUMNS, 2
BLUEHIST( IMAGE( I, J))= BLUEHIST( IMAGE( I, J))+ 1
GREENHIST( IMAGE( I- 1, J))= GREENHIST( IMAGE( I- 1, J))+ 1
GREENHIST( IMAGE( I, J- 1))= GREENHIST( IMAGE( I, J- 1))+ 1
REDHIST( IMAGE( I- 1, J- 1))= REDHIST( IMAGE( I- 1, J- 1))+ 1
IF( IMAGE( I, J) .LT. MINBLUE) MINBLUE= IMAGE( I, J)
IF( IMAGE( I- 1, J- 1) .LT. MINRED) MINRED= IMAGE( I- 1, J- 1)
IF( IMAGE( I- 1, J) .LT. MINGREEN) MINGREEN= IMAGE( I- 1, J)
IF( IMAGE( I, J- 1) .LT. MINGREEN) MINGREEN= IMAGE( I, J- 1)
IF( IMAGE( I, J) .GT. MAXBLUE) MAXBLUE= IMAGE( I, J)
IF( IMAGE( I- 1, J) .GT. MAXGREEN) MAXGREEN= IMAGE( I- 1, J)
IF( IMAGE( I, J- 1) .GT. MAXGREEN) MAXGREEN= IMAGE( I, J- 1)
IF( IMAGE( I- 1, J- 1) .GT. MAXRED) MAXRED= IMAGE( I- 1, J- 1)
IF( IMAGE( I- 1, J- 1) .LT. MINRED) MINRED= IMAGE( I- 1, J- 1)
2 CONTINUE
C NOW INTEGRATE THE AREA UNDER THE HISTOGRAMS FOR EACH COLOR.
BLUETOTAL( 0)= DFLOAT( BLUEHIST( 0))
GREENTOTAL( 0)= DFLOAT( GREENHIST( 0))
REDTOTAL( 0)= DFLOAT( REDHIST( 0))
CUTOFF( REDCHANNEL)= -1
CUTOFF( BLUECHANNEL)= -1
CUTOFF( GREENCHANNEL)= -1
WRITE( *, *) ' BLUE= ', MAXBLUE, MINBLUE
WRITE( *, *) ' GREEN= ', MAXGREEN, MINGREEN
WRITE( *, *) ' RED= ', MAXRED, MINRED
DO 3 I= 1, MAXPIXEL
BLUETOTAL( I)= BLUETOTAL( I- 1)+ DFLOAT( BLUEHIST( I))
GREENTOTAL( I)= GREENTOTAL( I- 1)+ DFLOAT( GREENHIST( I))
REDTOTAL( I)= REDTOTAL( I- 1)+ DFLOAT( REDHIST( I))
3 CONTINUE
C NORMALIZE THE CURVES.
DO 4 I= 1, MAXPIXEL
BLUETOTAL( I)= BLUETOTAL( I)/ DFLOAT( COLUMNS* ROWS/ 4)
REDTOTAL( I)= REDTOTAL( I)/ DFLOAT( COLUMNS* ROWS/ 4)
GREENTOTAL( I)= GREENTOTAL( I)/ DFLOAT( COLUMNS* ROWS/ 2)
C LOOK FOR THE 95%.
IF( BLUETOTAL( I) .GT. INTEGRATION_CUTOFF .AND.
1 CUTOFF( BLUECHANNEL) .EQ. -1) THEN
WRITE( *, *) 'BLUETOTAL( ', I, ')= ', BLUETOTAL( I)
CUTOFF( BLUECHANNEL)= I
END IF
IF( GREENTOTAL( I) .GT. INTEGRATION_CUTOFF .AND.
1 CUTOFF( GREENCHANNEL) .EQ. -1) THEN
WRITE( *, *) 'GREENTOTAL( ', I, ')= ', GREENTOTAL( I)
CUTOFF( GREENCHANNEL)= I
END IF
IF( REDTOTAL( I) .GT. INTEGRATION_CUTOFF .AND.
1 CUTOFF( REDCHANNEL) .EQ. -1) THEN
WRITE( *, *) 'REDTOTAL( ', I, ')= ', REDTOTAL( I)
CUTOFF( REDCHANNEL)= I
END IF
4 CONTINUE
C ADJUST THE BLUE CURVE TO MATCH RED.
DO 20 J= 1, MAXPIXEL
C FOR EVERY BLUE INTEGRATED TOTAL, FIND THE RED VALUE THAT EXCEEDS IT.
IF( BLUEHIST( J) .GT. 0) THEN
I= 1
5 I= I+ 1
IF( I .LT. MAXPIXEL .AND.
1 BLUETOTAL( J) .GT. REDTOTAL( I)) GO TO 5
GAINCURVE( J)= DFLOAT( I)/ DFLOAT( J)
END IF
20 CONTINUE
C SCALE BLUE CHANNEL TO RED RESPONSE CURVE.
K= MIN0( MINRED, MINBLUE)
DO 35 J= 2, ROWS, 2
DO 35 I= 2, COLUMNS, 2
BIGVALUE= IMAGE( I, J)
BIGVALUE= INT( DFLOAT( BIGVALUE)* GAINCURVE( BIGVALUE))
IF( BIGVALUE .GT. Z'03FFF') BIGVALUE= Z'03FFF'
IMAGE( I, J)= VALUE( 1)
35 CONTINUE
C EQUALIZE GREEN TO RED.
DO 41 J= 1, MAXPIXEL
C FOR EVERY GREEN INTEGRATED TOTAL, FIND THE RED VALUE THAT EXCEEDS IT.
I= 1
42 I= I+ 1
IF( I .LT. MAXPIXEL .AND.
1 GREENTOTAL( J) .GT. REDTOTAL( I)) GO TO 42
GAINCURVE( J)= DFLOAT( I)/ DFLOAT( J)
C WRITE( *, *) ' GAIN( ', J, ')= ', GAINCURVE( J)
41 CONTINUE
K= MIN0( MINRED, MINGREEN)
DO 40 J= 1, ROWS- 1, 2
DO 40 I= 1, COLUMNS- 1, 2
C EXCHANGE BLUE AND RED IF NOT BEING DONE IN THE CFA FILTER PATTERN TAG.
C EXCHANGE= IMAGE( I, J)
C IMAGE( I, J)= IMAGE( I+ 1, J+ 1)
C IMAGE( I+ 1, J+ 1)= EXCHANGE
C GREEN PIXEL ON RG ROW
BIGVALUE= IMAGE( I+ 1, J)
BIGVALUE= INT( DFLOAT( BIGVALUE)* GAINCURVE( BIGVALUE))
IF( BIGVALUE .GT. Z'03FFF') BIGVALUE= Z'03FFF'
IMAGE( I+ 1, J)= VALUE( 1)
C GREEN VALUE OF THE GBGBGBGB ROW.
BIGVALUE= IMAGE( I, J+ 1)
BIGVALUE= INT( DFLOAT( BIGVALUE)* GAINCURVE( BIGVALUE))
IF( BIGVALUE .GT. Z'03FFF') BIGVALUE= Z'03FFF'
IMAGE( I, J+ 1)= VALUE( 1)
40 CONTINUE
WRITE( *, *) ' FINISHED COLORMOSAIC'
RETURN
END


FORTRAN? Who said FORTRAN?

 
I worked with FORTRAN from the IBM 704. Earned my way through college by vectorizing atomic structure programs for a Supercomputer. The oldest code was written in 1957.
FORTRAN
FORTRAN with Format
FORTRAN II
FORTRAN-63 (from CDC)
FORTRAN IV
FORTRAN 66
FORTRAN 77
FORTRAN 90- but went back to FORTRAN 77.

I use the Microway NDP FORTRAN-77 v4.4 compiler that is a port of the Green Hills VAX compiler, and the Open Watcom v2 compiler.
 
Last edited:
I worked with FORTRAN from the IBM 704. Earned my way through college by vectorizing atomic structure programs for a Supercomputer. The oldest code was written in 1957.
FORTRAN
FORTRAN with Format
FORTRAN II
FORTRAN-63 (from CDC)
FORTRAN IV
FORTRAN 66
FORTRAN 77
FORTRAN 90- but went back to FORTRAN 77.

I use the Microway NDP FORTRAN-77 v4.4 compiler that is a port of the Green Hills VAX compiler, and the Open Watcom v2 compiler.


Yeah, well when real men code they code COBOL LOL I still have all my manuals. IBM and after-market. McCracken? And a "Greenie" the Holy Grail for COBOL and AL coders when the "Greenie" was a bunch of accordian folded 5081's. And the "big" 1401 had 16K of memory, the big one. The small one was 12K. Sheesh. Ran a chain of banks on one.

Oh, no, we have wandered off this thread again. lo)

 
It is a giant paradox.
Basically one that is akin to a Tempest in a teapot.

Think of your top Three favorite photographers. Let’s say they are Ansell Adams, Rocco Siffredi, and Winogrand.

What have you ever seen from your top three? A hunddred times saved/re-saved Web sized jpegs. A few printed books and magazines from 300dpi/256 colors files. And mayyyybe an exhibition involving 8x10 and 11x14 prints, from which a few were scans, once again transfered to jpeg.

Oh, as a sidenote, all of Saul Leiters collection is basically a few boxes of slides having lived 50 years in an attic, survived a fire, survived a few vest pockets next to used handkerchiefs and dried pumpkin seeds.

Basically, your top three photographers, anywho they may be, are occupying free rent soace in your head from photographs yoy gave seen on a comp screen- jpeg small-quality 8.

Food for thought.
 
Last paragraph:

Basically, your top three photographers, anywho they may be, are occupying free rent SPACE in your head from photographs YOU HAVE seen on a comp screen- jpeg small-quality 8.
 
It is a giant paradox.
Basically one that is akin to a Tempest in a teapot.

Think of your top Three favorite photographers. Let’s say they are Ansell Adams, Rocco Siffredi, and Winogrand.

What have you ever seen from your top three? A hunddred times saved/re-saved Web sized jpegs. A few printed books and magazines from 300dpi/256 colors files. And mayyyybe an exhibition involving 8x10 and 11x14 prints, from which a few were scans, once again transfered to jpeg.

Oh, as a sidenote, all of Saul Leiters collection is basically a few boxes of slides having lived 50 years in an attic, survived a fire, survived a few vest pockets next to used handkerchiefs and dried pumpkin seeds.

Basically, your top three photographers, anywho they may be, are occupying free rent soace in your head from photographs yoy gave seen on a comp screen- jpeg small-quality 8.

Food for thought.
Good food for the brain, thanks. And most of us will never see the negatives from the artists you mentioned. Same with RAW files. I utilise them to have more flexibility if i want to tune the output image. Sharing will be in screen quality most likely and in jpeg.
 
This may be heresy, particularly in a forum like RFF where so many of us nitpick about ultimate resolution and tonal scale, but I've always felt that an image should be able to stand up to the degradation imposed by reproduction (whether a jpeg compression on a digital screen, book, inkjet print, etc.). I am thinking mostly about film photography here, but it applies across the board. Of course, there is nothing like a fastidiously printed 8x10 view camera image seen in person; regardless of one's opinion of Ansel, for example, his original prints are an experience. But images need to be disseminated into the world, and if the impact of a photograph is so utterly dependent on ultimate image quality, it begs the question of content. I'm not going to flog the old, false dichotomy of form vs content; they are inextricably intertwined, of course. But when ultimate resolution effectively becomes the content, I feel that the image is, in some ways, failing.
Again, to cite Ansel, many photographers have probably never seen an original print of his. Nevertheless, his influence on landscape photographers has been enormous, due to the widespread distribution of his work in books and posters. His vision was strong enough that, while depending on the technical possibilities of large format, it was able to transcend the limitations of reproduction.
And I cite Ansel as an example only. Not a big fan, here. More heresy!
 
Exactly!

Same for Saul Leiter; his photographs go straight to the heart, Regardless of how downscaled the original kodachrome may be, once viewed on a website, or even on a iphone screen.

This may be heresy, particularly in a forum like RFF where so many of us nitpick about ultimate resolution and tonal scale, but I've always felt that an image should be able to stand up to the degradation imposed by reproduction (whether a jpeg compression on a digital screen, book, inkjet print, etc.). I am thinking mostly about film photography here, but it applies across the board. Of course, there is nothing like a fastidiously printed 8x10 view camera image seen in person; regardless of one's opinion of Ansel, for example, his original prints are an experience. But images need to be disseminated into the world, and if the impact of a photograph is so utterly dependent on ultimate image quality, it begs the question of content. I'm not going to flog the old, false dichotomy of form vs content; they are inextricably intertwined, of course. But when ultimate resolution effectively becomes the content, I feel that the image is, in some ways, failing.
Again, to cite Ansel, many photographers have probably never seen an original print of his. Nevertheless, his influence on landscape photographers has been enormous, due to the widespread distribution of his work in books and posters. His vision was strong enough that, while depending on the technical possibilities of large format, it was able to transcend the limitations of reproduction.
And I cite Ansel as an example only. Not a big fan, here. More heresy!
 
One thing is download an original image to a viewer, another thing is limit/download the origial itself... these are two different things.

But I also think that if an image doesn't have "soul", it is the same how the final image is get. It can be technically the best image but it will not go straight to the heart.

At the same time, if an image is like @Ororaro says, one of those that goes straight to the hear and it is technically the best as possible, it is still better.

JPG vs RAW? Why do you like so much "one thing vs another thing"? I don't understand... Each one decides which tools and how to use those... don't you think so?

If someone ask me how I do something, I will try to explain it, and not to try to convince her/him.

The Light be with you!
 
It is a giant paradox.
Basically one that is akin to a Tempest in a teapot.

Think of your top Three favorite photographers. Let’s say they are Ansell Adams, Rocco Siffredi, and Winogrand.

What have you ever seen from your top three? A hunddred times saved/re-saved Web sized jpegs. A few printed books and magazines from 300dpi/256 colors files. And mayyyybe an exhibition involving 8x10 and 11x14 prints, from which a few were scans, once again transfered to jpeg.

Oh, as a sidenote, all of Saul Leiters collection is basically a few boxes of slides having lived 50 years in an attic, survived a fire, survived a few vest pockets next to used handkerchiefs and dried pumpkin seeds.

Basically, your top three photographers, anywho they may be, are occupying free rent soace in your head from photographs yoy gave seen on a comp screen- jpeg small-quality 8.

Food for thought.

I do not often see Rocco named as in anyone's top three. I have to get out more often.
 
I do not need a large image in order to appreciate it. If that were true I'd spend a lot of time at the Hayden Planetarium looking at the ceiling there. A good image is a good image whether on a note pad or on a billboard. Just as Beethoven's 9th can be enjoyed on a mono AM radio. However I would enjoy either better reproduced well.

My first impressions of The Decisive Moment were when the first edition came out. The prints in the book were large but not very large, frame-able prints to hang on a wall. I still got the point.. Dorthea Lange's capture depression era "Migrant Mother" in any size is arresting, period. The Story Behind the Iconic 'Migrant Mother' Photo that Defined the Great Depression. The trick is always to point the damned camera at something interesting, something we will all find interesting. Otherwise you may as well be taking pictures of a wall.
 
Last edited:
Do all jpeg images get altered by the forum algorithms when uploaded? Even if they are small and don’t require dimensional re-size or file-size reduction?

I wonder - as an experiment- if one were to generate an MD5 checksum (or other hash) against a file, upload it, then redownload and rerun the MD5 to compare the hash - what would be the result?

For regular files, I run it from the macOS command-line.

Here is another method for images:

I could do it, but I’m at the gym right now 🙂
 
Last edited:
Yeah, well when real men code they code COBOL LOL I still have all my manuals. IBM and after-market. McCracken? And a "Greenie" the Holy Grail for COBOL and AL coders when the "Greenie" was a bunch of accordian folded 5081's. And the "big" 1401 had 16K of memory, the big one. The small one was 12K. Sheesh. Ran a chain of banks on one.

Oh, no, we have wandered off this thread again. lo)


I ran a FORTRAN-66 program through a COBOL compiler so it could know what real code looked like.
 
Back
Top Bottom