0

I'm building a web application (RoR) that manages images that are in raw image format. I need to create thumbnail/web versions of these images to be displayed on the site. Currently, I'm using imagemagick, which delegates to dcraw to produce the jpeg thumbnail. The problem I'm running into is that the thumbnail deviates from the look of the original; the image gets darker and the white balance is sometimes heavily shifted.

I'm assuming that the raw format default setting can't be read by dcraw, and thus it's left guessing how to parameterize the raw conversion. I can play around with customizing these setting, but it seems getting it right on one image causes others to be further off the mark.

Is there a better way to do this in order to get a result that more closely mimics the what I might see in a raw viewer like photoshop, or even Mac OSX preview? Given that Mac OS X supports a variety of digital camera raw formats, is there anyway to utilize the OS's ability to render preview images (especially considering that result is what is expected).

The raw images that I'm using are 3FRs and fffs (both from Hasselblad).

I can post samples if people are interested.

Thanks

cgat
  • 3,689
  • 4
  • 24
  • 38
  • "`is there anyway to utilize the OS's ability to render preview images`" Are you asking how to execute system commands? – the Tin Man Mar 27 '14 at 20:28
  • 1
    And, have you looked at "sips"? https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/sips.1.html and http://www.ainotenshi.org/818/resizing-images-using-the-command-line to get you started. – the Tin Man Mar 27 '14 at 20:29
  • @theTinMan No, I understand how to execute system commands (and the repercussions). In regards to 'sips', exactly what I'm looking for, there is even a basic ruby wrapper available. – cgat Mar 27 '14 at 20:52
  • Maybe have a look here... http://www.fmwconcepts.com/imagemagick/autolevel/ – Mark Setchell Apr 17 '14 at 21:45

1 Answers1

0

Look at "sips" and "Resizing images using the command line" to get you started.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
  • After using sips for a bit, I've found that it produce images that are much too blurry for practical us when the scale factor of the resize is large (I was trying to convert 7000x5000 images into ~150x120) thumbnails. – cgat Apr 10 '14 at 02:26