PhotoShop RAW with Image->Mode->Lab

BP
Posted By
BarryR_Palmer
Jan 30, 2007
Views
499
Replies
15
Status
Closed
I have created a RAW file (computer generated test image). It just contains the 3 bytes per pixel data.
The colorspace is Lab.

When I open with PhotoShop CS2 it seems to assume RGB. How do I tell PhotoShop the data is Lab ???

Is there a special header I need in the file ?

I have tried to create a Lab image wth photoShop then save as PhotoShop RAW & examine the resulting file but cannot see any clues. Then when I reopen this file the colors are all wrong – PhotoShop has assumed RGB again.

I just need to import this raw LAB data then save as an Lab Tiff. Any ideas ???

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

RB
Robert_Barnett
Jan 30, 2007
How exactly did you "create a Raw file" only cameras can do that.

Robert


Do not assume that because I didn’t reply to your comments that you are correct or that I am wrong or that I am correct and your are wrong. You can assume that you bore me!
JB
John_Bean_UK
Jan 30, 2007
How exactly did you "create a Raw file" only cameras can do that.

Such a lot yet to learn Robert. Look in the Photoshop
documentation to read about Photoshop raw files, and bear in mind that raw files are not the same as "Camera Raw" files in Photoshop.


John Bean
RB
Robert_Barnett
Jan 31, 2007
Yes, I am aware of Photoshop’s being able to save the binary RAW files. I just never knew or heard of anyone using it without think it created a real RAW file that would open in ACR.

Robert


Do not assume that because I didn’t reply to your comments that you are correct or that I am wrong or that I am correct and your are wrong. You can assume that you bore me!
RB
Robert_Barnett
Jan 31, 2007
Also, your original post was vague. Had you explained in more detail the confusion would have been avoided. To date the times that the Photoshop binary RAW file that was talked about on here was dealing with people that thought it would allow them to save any image as a RAW file that would work in Adobe Camera Raw and it doesn’t. So that was the source of the confusion that and your vague message.

Robert


Do not assume that because I didn’t reply to your comments that you are correct or that I am wrong or that I am correct and your are wrong. You can assume that you bore me!

wrote in message
How exactly did you "create a Raw file" only cameras can do that.

Such a lot yet to learn Robert. Look in the Photoshop
documentation to read about Photoshop raw files, and bear in mind that raw files are not the same as "Camera Raw" files in Photoshop.


John Bean
JB
John_Bean_UK
Jan 31, 2007
Also, your original post was vague.

Ah, you lack of knowledge is my fault then. I can live with that.


John Bean
RB
Robert_Barnett
Feb 1, 2007
No the lack of a clear question to begin with is the problem. Any time you use Raw in a message about Photoshop people are going to think you are talking about digital camera RAW files. Not the binary RAW format that Photoshop can save that so few use.

Robert


Do not assume that because I didn’t reply to your comments that you are correct or that I am wrong or that I am correct and your are wrong. You can assume that you bore me!
GH
Gernot_Hoffmann
Feb 1, 2007
Barry,

so far I can confirm your observations – the
Lab data are always interpreted as RGB data.
A Lab-Lab Icc-profile is not accessible by PhS7.

The problem can be solved as follows:

1. Download test image
<http://www.fho-emden.de/~hoffmann/LabImi.raw>

2. Download EPS file
<http://www.fho-emden.de/~hoffmann/RawLab.eps>

3. Write actual path for the test image into
the EPS file by an ordinary text editor
(WordPad).

4. Open EPS in mode Lab Color by Photoshop.

Proceed similarly with your data. Use actual
values xpx=width and ypx=height. Eventually
adjust the bounding box.

Best regards –Gernot Hoffmann
BP
BarryR_Palmer
Feb 1, 2007
Gernot – Thanks

A very good side-step solution.
I’m still not there yet – colors still wrong.
Not being familiar with PostScript I cannot follow your maths but I encode my RAW file as the FIFF CieLab specification
So
L*a*b = 48,81,-12 is coded in my RAW file as the 3 byte string 122,8,244

I could code differently if this would help

Thanks again for taking the time
GH
Gernot_Hoffmann
Feb 1, 2007
Barry,

thanks for the feedback.
Do you get the correct values, using my test image ?
Easily checked by Info Palette (one half in Lab,
the other in sRGB).
Here it’s OK, besides a rounding error (2 units, too much) for sRGB Blue in the yellow patch.

The CieLab conversion is described here (about 1.7MB):
<http://www.fho-emden.de/~hoffmann/cielab03022003.pdf>

Best regards –Gernot Hoffmann
BP
BarryR_Palmer
Feb 1, 2007
Gernot

Still a little confused by the CieLab 8 bit coding.
The Adobe Tiff specification says :
"For CIELab (PhotonetricInterpretation=8), the L* component is encoded in 8 bits as an unsigned integer range [0,255]. The a* and b* components in 8 bits are signed integers range[-128,127]."

To me a signed integer means if the sign bit is set you take the two’s complement. So an 8-bit value of 120 represents 120 but an 8-bit value of 130 (hex 82) represents -126 (that is 256-130).

In your test image I see a grey frame with 2 squares. The left square is yellow (L*a*b*=82,4,80) and in the Raw data file I would expect (82*2.55=209,4,80) but I see (209, 128+4, 128+80).

There is my confusion.
GH
Gernot_Hoffmann
Feb 1, 2007
Barry,

I had programmed the GMB ColorChecker as a Lab EPS.
Then opened by PhS in Lab Color, cropped for the
remaining two patches and saved as RAW file.
Therefore I didn’t apply the coding explicitly.

International Color Consortium
Specification ICC.1:2004-10
p.43,44 (16 bit, don’t find this for 8 bit):

L*:
000.0—0000h
100.0—FF00h
FFFFh is not valid

a*,b*:
-128.0–0000h
000.0–8000h
+127.0–FF00h
FFFFh is valid

That’s not the two’s complement. It’s merely
an offset. There are many oddities in the ICC
number definitions, IMO.

Best regards –Gernot Hoffmann
GH
Gernot_Hoffmann
Feb 1, 2007
BP
BarryR_Palmer
Feb 1, 2007
Gernot

Many thanks for your input – I have just saved your image (opened the eps as Lab) from PhotoShop as a lab Tiff – labImi.tif.

View this tif with a hex viewer & the yellow patch is stored as triplets of (D0, 04, 50) not as in the original file labimi.raw where it is stored as (D0,84,D0).

If I recode my raw file creation to use your method instead of PhotoShop’s then I guess it will work.

Thanks again
BP
BarryR_Palmer
Feb 1, 2007
Gernot

This is the Lab Tiff spec I was working from

< http://partners.adobe.com/public/developer/en/tiff/TIFFphoto shop.pdf>

Lots of room for confusion !!

Barry
GH
Gernot_Hoffmann
Feb 1, 2007
Barry,

my mental Hex arithmetic is already rusty.
Do you believe that the offset coding as
explained in the ICC specs is valid for
Photoshop’s internal LAB calculations ?
As already explained – I didn’t code Lab
Raw explicitly.

Thanks for the information about TIFF.
So far I didn’t try to understand the doc.
It cannot be excluded, that negative numbers
in TIFFs are coded by the two’s complement.
IMO this is the only reasonable method,
because it would allow an immediate decoding
in high level languages by defining the
variable as a signed byte type.

Best regards –Gernot Hoffmann

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

Related Discussion Topics

Nice and short text about related topics in discussion sections