Go Back   Rangefinderforum.com > Cameras / Gear / Photography > Rangefinder Forum > Image Processing: Darkroom / Lightroom / Film > Photo Software

Photo Software Discussions of all the photo software - except scanning software which is in the forum with scanners.

Thread Tools Search this Thread Display Modes

ImageMagick questions
Old 05-25-2016   #1
Registered User
Jhausler is offline
Join Date: Oct 2013
Posts: 117
ImageMagick questions

Any ImageMagick users out there?

I recently started "scanning" negatives with an M9 and wanted an easy way to invert the files before importing into LR.

I know I can just invert the Tone Curve, but then everything is backwards and my brain can't handle that

I wrote up a super simple script to run on a folder full of DNGs:
for i in *.DNG; do convert -negate ${i%.*}.DNG ${i%.*}.tif; done

I did this because apparently while IM can read DNG files, it cannot write them.

It seems to work well. I intend to dump the DNGs and just keep the TIFs. I have the negatives, so it's not as if i'm deleting the "originals".

Here come the questions...
1) Am I losing any data through this conversion?

2) The DNG files start at around 36.4mb but the TIF files are all close to 90mb. Is there any way to trim these without losing any data?
I'll probably come up with more, but this is a good start to see if there are any IM users out there.

  Reply With Quote

Old 05-25-2016   #2
:: Mark
Registered User
:: Mark is offline
Join Date: Sep 2014
Location: Barcelona
Posts: 162
Try adding a -compress option, such as lzw or zip. You may need to experiment a bit to find something that is both small and compatible with your software (I use zip with CaptureOne, but most things work with Adobe).

The TIFFs should be lossless, but the Bayer demosaicing algorithm will have been baked-in during conversion (probably the Apple RAW conversion) which may mean that you get a different result from using the dng directly. Exactly what depends on the software that you use, but it can affect things like lens distortion and chromatic abberation corrections - although for macro/copy work I doubt that you would see any real difference.

It is a shame that there is not a standardised lossless compression scheme that works efficiently with photographs.
  Reply With Quote

Old 05-26-2016   #3
Registered User
Jhausler is offline
Join Date: Oct 2013
Posts: 117
Thanks Mark, i'll give zip a shot.
  Reply With Quote

Old 05-26-2016   #4
Registered User
Jhausler is offline
Join Date: Oct 2013
Posts: 117
hmm.. i couldn't get lightroom to import a .zip.

Do i still save it as a .tif as in..

convert -compress zip L1234.tif L1234.tif?

I did
convert -compress zip L1234.tif L1234.zip
  Reply With Quote

Old 06-17-2016   #5
Slide Lover
DrTebi's Avatar
DrTebi is offline
Join Date: Jan 2008
Location: San Francisco, CA
Posts: 235
In case you haven't figured it out yet... yes, you still save it as a TIF, not as a ZIP file. the -compress zip option tells ImageMagick to convert the TIF image to a TIF, with "internal" zip compression (for lack of a better word). But it should still have the same extension.

So to sum it up, this is correct:
convert -compress zip L1234.tif L1234.tif
My current favorites:
Fuji GW670III, Plaubel Makina 670, Konica Hexar RF, Contax T2, Yashica Electro 35 GSN.
Mamiya ZM Quartz with lots of lenses for my SLR satisfaction.
Ricoh GXR with the A12 modules for the instant gratification.

All my favorite analog images are on flickr:
  Reply With Quote

Old 06-17-2016   #6
michaelwj's Avatar
michaelwj is offline
Join Date: Feb 2013
Location: Brisbane AUS
Posts: 1,589
I haven't used IM for years, but I use FIJI (ImageJ) a lot at work. If I remember correctly, you can save the image as a RAW file in IM just like FIJI, which you essentially choose the way the file is written and the format (we use it to write phase and aptitude complex images). It might be a little f*ing around, but once it's scripted ...
  Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -8. The time now is 07:18.

vBulletin skin developed by: eXtremepixels
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

All content on this site is Copyright Protected and owned by its respective owner. You may link to content on this site but you may not reproduce any of it in whole or part without written consent from its owner.