Skip to content

Instantly share code, notes, and snippets.

@dbast
Created December 2, 2013 22:38
Show Gist options
  • Save dbast/7760376 to your computer and use it in GitHub Desktop.
Save dbast/7760376 to your computer and use it in GitHub Desktop.
uniform_exposure.py exiftool sRGB patch
--- uniform_exposure.py 2013-12-02 22:12:21.000000000 +0100
+++ uniform_exposure_patched1.py 2013-12-02 23:05:20.000000000 +0100
@@ -393,12 +393,12 @@
run(cmd)
if 1:
- # copy over exif-data (without old preview/thumbnail-images and without orientation as ufraw already takes care of it) and add comment with processing parameters
+ # copy over exif-data (without old preview/thumbnail-images and without orientation/icc-profile as ufraw already takes care of it), setting colorspace to sRGB and add comment with processing parameters
comment = "overall_bias=%g; highlight_level=%g; midtone_level=%g; shadow_level=%g; ufraw_options='%s'; " % (overall_bias, highlight_level, midtone_level, shadow_level, ufraw_options)
comment += "midtones: brightness level %5d => exposure %+.2f EV; " % (mm, ecm)
comment += "highlights: brightness level %5d => exposure %s EV %s; " % (mh, ",".join(["%+.2f" % e for e in ech]), "" if needs_highlight_recovery else "(skipping)")
comment += "shadows: brightness level %5d => exposure %s EV %s" % (ms, ",".join(["%+.2f" % e for e in ecs]), "" if needs_shadow_recovery else "(skipping)")
- cmd = 'exiftool -TagsFromFile "%s" -comment="%s" -ThumbnailImage= -PreviewImage= -Orientation= -z -overwrite_original "%s"' % (r, comment, j)
+ cmd = 'exiftool -TagsFromFile "%s" -comment="%s" -ThumbnailImage= -PreviewImage= -Orientation= -icc_profile:all= -all:Colorspace=sRGB -z -overwrite_original "%s"' % (r, comment, j)
run(cmd)
print ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment