Dark Image Previews

478 views
Skip to first unread message

MIke Randolph

unread,
May 16, 2014, 3:46:47 PM5/16/14
to resour...@googlegroups.com
I am having a persistent issue regarding dark image previews. Any image from a Nikon D4, even if the exposure is spot-on, will result in a preview in Resource Space appearing 2 stops darker than the original NEF file. Images shot with a Canon 5d mkII, Nikon d700 and d3 will generate previews that look perfect. We have 4 D4 bodies in the office, and the problem in consistent with all d4 cameras. The JPG's generated by Resource Space from the RAW file shows the same issue. 

Uploading a JPG file either shot by the D4, or converted from an NEF file with Photoshop, Lightroom or PhotoMechanic will show up fine in Resource Space.

Some of the solutions we have tried:

Different Camera Settings
Raw Lossless compression
Raw Uncompressed
sRGB color profile
Adobe RGB color profile


I have tried a couple solutions suggested by other threads. One of them involved updating ImageMagic, which we did. The other is outlined below.

A potential fix ... it refers to the image magic module df resource space:
 
File: include\image_processing.php
Line: 886
Changed “RGB” to “sRGB”
 
File: include\preview_preprocessing.php
Line: 595
Old:
$profile="+profile icc -colorspace RGB"; # By default, strip the colour profiles ('+' is remove the profile, confusingly)
New:
$profile="-profile icc -colorspace sRGB"; # By default, strip the colour profiles ('+' is remove the profile, confusingly)
 
Line: 633
Changed “RGB” to “sRGB”

Any suggestion would be GREATLY appreciated. I'm not ready to give up just yet. 

Thanks,

Michael Randolph

Jeff Nova

unread,
May 19, 2014, 11:31:47 AM5/19/14
to resour...@googlegroups.com
Have you tried ExifTool extraction? It's a config option. Search for NEF. 

Also if you are using dcraw as delegate to ImageMagick, report the issue in their forums and see if it's a camera-specific bug. 

Jeff

--
Jeff Nova
Chief Executive Officer
Colorhythm LLC

Main Office:  +1 415-399-9921
Mobile:  +1 510-710-9590

--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.org
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespac...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

resourc...@gmail.com

unread,
Mar 3, 2016, 4:47:28 AM3/3/16
to ResourceSpace

I have the same problem most likely. Using a cannon camera and with the file format cr2. The camera generates cr2 and jpg files. The jpg files upload fine, but the cr2 files are all super dark. Then any resulting image made from the dark image is also dark.

Is there a fix for this issue? I read some threads about colourspaces and accurate colour representation but its way over my head. I am just an IT guy trying to implement a DAM. The implementation will fail if resource space keeps fowling the files. They look fine in explorer and any image program I care to try. The problem begins when these raw files are uploaded to the dam. Below is a screen shot of what i mean. The RAW is on the right and the jpg is on the left. Generated with a canon 6 eds or something like that.






Allison M Stec

unread,
Mar 3, 2016, 7:58:57 AM3/3/16
to resour...@googlegroups.com
Are you attempting to extract a cr2 embedded preview at all ("$cr2_thumb_extract=true;")? This feature is off by default.

I know I have to build a version of ImageMagick from source to get a current version, so that's another possible place to look.
--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.org
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespac...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
--
ResourceSpace Developer
Reseller of Colorhythm's Prismpoint Portal DAM

resourc...@gmail.com

unread,
Mar 3, 2016, 11:55:49 AM3/3/16
to ResourceSpace






Firstly, I have tried to enable this variable (("$cr2_thumb_extract=true;") in /include/config.default.php) but this results in no image preview whatsoever and an error regarding html5. (sorry about image placement it seems that google forums wants to put images at the beginning of every message sigh)

Secondly I see there is another thread about this, so i should make the comment that imagemagick version is: Version: ImageMagick 6.9.3-6 Q16 x64 2016-02-28 http://www.imagemagick.org

which i think is pretty current!. I dont have any compiler so i cant compile anything (windows). I just built the resource space server this week, so every library should be pretty current. this is from the installation check screen (which is quite useful! and should be mentioned in the install docs). I noticed that php_exif.dll was not enabled from this screen so i enabled that as well but it did nothing.






Jeff Nova

unread,
Mar 3, 2016, 12:13:18 PM3/3/16
to resour...@googlegroups.com
Be sure you edit config and not config_default for all your manual settings.

Do you have Exiftool installed and its path set?  That's what extracts the previews from CR2s when that is set, not ImageMagick. 

Best,
Jeff

resourc...@gmail.com

unread,
Mar 4, 2016, 4:11:01 AM3/4/16
to ResourceSpace

whats the full path to this config file? I just searched /resourcespace/* for the string in any *.php files. Thats how i am figuring out where to make these changes, as people say "config file" but then never post a path to it.


Oh i see it now, its in /resourcespace/include/config.php and i didnt find it because those strings aren't actually in the file, i guess i have to add them taking the syntax from default.config.... Not what i am used to but whatever.
I wonder why changing the default.config.php files had an effect on the system though.

Actually its the same effect. I get the same HTML 5 error when i added it to /include/config.php.

i tried adding "$imagemagick_colorspace="sRGB";" to the config file (correct one this time) and it has not helped either.

Exiftool is installed. see screen shot.

I tried to attach the cr2 file but its too big (20mb) and the limit is 10mb...
here i put it on wetransfer:

http://we.tl/u6Qfnezh1U






Allison M Stec

unread,
Mar 4, 2016, 8:59:48 AM3/4/16
to resour...@googlegroups.com
RS was able to extract a preview image with $cr2_thumb_extract=true and didn't suffer from the darkness that the ImageMagick created previews had. Preview generation was also much faster this way.

Unfortunately, I wasn't able to get a good preview any other way, Attempts to use icc extraction or ImageMagick color profile preservation options resulted in darkened previews.

I'm no expert when it comes to image color, but maybe someone else can explain these results.
--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.org
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespac...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

resourc...@gmail.com

unread,
Mar 4, 2016, 1:49:03 PM3/4/16
to ResourceSpace

Wow great. I am glad it can theoretically work but i think my server must be misconfigured because all i get when uploading after setting that variable to true is:

Upload summary - server time : 04 Mar 16 @ 18:20
IMG_101212.CR2 - Server side error! Please contact the administrator!

And the preview is not generated. I turned on the debug log but there is no error in it. Just a bunch of sql and nothing says failed or anything like that.
Any other place i can look translating "server side error" into an error i can use? exiftool version is 10.11



Allison M Stec

unread,
Mar 4, 2016, 1:54:05 PM3/4/16
to resour...@googlegroups.com
I'd have a look at the php error log.

You could also modify the error output around line 719 of upload_plupload.php to include the actual error and not just a generic response.
--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.org
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespac...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

resourc...@gmail.com

unread,
Mar 9, 2016, 5:15:12 PM3/9/16
to ResourceSpace
I think the code you are talking about is from line 657 to line 680, however i dont see anything i can comment in to make errors log better. There is no commented out code there, so how exactly would i "modify the error output"? Not sure what you mean by that. I am not a developer, i am a systems administrator. I obviously cant write php code...

line 668 is the string 'Server side error! Please contact the administrator!' so i assume i am supposed to put some variable with the error. i asked my co worker who develops PHp and he suggested changing line 668 to read "  uploaderrormessage = uploadError;" but that has resulted in no errors at all and still no thumbnail generation.

please advise, more specifically if you can.

Allison M Stec

unread,
Mar 10, 2016, 8:42:55 AM3/10/16
to resour...@googlegroups.com
Try changing your line 668 from:

uploaderrormessage = 'Server side error! Please contact the administrator!';

to...

uploaderrormessage = 'Server side error! Please contact the administrator!' .$e->getMessage();
--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.org
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespac...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages