Aurigma Forums
»
Graphics Mill
»
Samples – Graphics Mill
»
HOWTO: Handle Adobe RGB Files whithout Embedded Profile
Rank: Member
Groups: Guest
Joined: 10/21/2008(UTC) Posts: 14
Was thanked: 1 time(s) in 1 post(s)
|
As discussed in this forum earlier, many digital cameras actually do not embed the color profile with their files. Specially for shots taken in Adobe RGB which never have been opened in Photoshop, it might be hard to detect the real color space. The EXIF "color space information" returns an "uncalibrated" but does not tell the whole truth... The clue is to check the white point chromacity as well as the chromacity of the Primaries and the color space transformation coefficients. These parameters can truly identify the usage of Adobe RGB. Here my little solution for a nasty problem - have fun ... Code:
Dim sRGB as boolean
Dim AdobeRGB as boolean
If _bmSrc.ColorProfile Is Nothing Then
Dim jpegReader As New Aurigma.GraphicsMill.Codecs.JpegReader(pixOrder.Quelle)
Dim exif As Aurigma.GraphicsMill.Codecs.ExifDictionary = jpegReader.Exif
Dim frame As Aurigma.GraphicsMill.Codecs.Frame = CType(jpegReader.LoadFrame(0), Aurigma.GraphicsMill.Codecs.Frame)
frame.GetBitmap(_bmSrc)
frame.Dispose()
jpegReader.Dispose()
AdobeRGB = True
sRGB = False
For Each key As Long In exif.Keys
If LCase$(exif.GetKeyDescription(key)) = "color space information" Then
If exif.GetItemString(key) <> "uncalibrated" Then
AdobeRGB = False
If exif.GetItemString(key) <> "sRGB" Then
sRGB = True
End If
End If
End If
If LCase$(exif.GetKeyDescription(key)) = "white point chromaticity" Then
If exif.GetItemString(key) <> "313/1000 329/1000" Then
AdobeRGB = False
End If
End If
If LCase$(exif.GetKeyDescription(key)) = "chromaticities of primaries" Then
If exif.GetItemString(key) <> "64/100 33/100 21/100 71/100 15/100 6/100" Then
AdobeRGB = False
End If
End If
Next key
If sRGB = True Then
_bmSrc.ColorProfile = Aurigma.GraphicsMill.ColorProfile.FromSrgb()
End If
If AdobeRGB = True Then
_bmSrc.ColorProfile = New Aurigma.GraphicsMill.ColorProfile(Application.StartupPath + "\AdobeRGB1998.icc")
End If
End If
Best regards from German color space Henricus Magnus :-) Edited by moderator Monday, May 28, 2012 8:34:03 PM(UTC)
| Reason: Not specified
|
1 user thanked HenricusMagnus for this useful post.
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 8/3/2003(UTC) Posts: 1,070
Thanks: 1 times Was thanked: 12 time(s) in 12 post(s)
|
Hello Henricus, Thanks for your valuable post. I am moving it into FAQ section. Edited by user Sunday, December 7, 2008 5:41:45 PM(UTC)
| Reason: Not specified |
|
|
|
|
Aurigma Forums
»
Graphics Mill
»
Samples – Graphics Mill
»
HOWTO: Handle Adobe RGB Files whithout Embedded Profile
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.