Film scanning with Sony mirrorless and Adobe Camera Raw
I’ve been shooting film for a few years now, and scanning/digitizing it myself almost as long. Here’s a guide to how I do it. This is mostly for slide film but should apply to any types of film.
Equipment
Mirrorless or DSLR camera. I use a Sony alpha α6500, basically any digital camera will work.
Macro lens. Don’t bother with old manual focus lenses or normal lenses with an extension tube. Personally I worked out that a real macro lens would pay for itself in lab fees before I even finished shooting the film in my freezer. Buy a proper lens and you’ll never regret it.
Tripod, best if you can flip it and put the neck on the bottom to be closer to the film.
A mask to keep light from leaking around from your film. Any sort of black cardboard or stock paper will work, with a hole cut slightly larger than the film you want to scan. In this case it’s actually a side of a beer case spray painted black.
Light pad. Don’t bother with cheap solutions like your smartphone or something, a real light source is cheap and much better. I have the Logan Electric 4x5”.
Loupe for viewing. If you have a fast normal lens like a 50mm f/1.8 you can simply turn it around and point the film end at your slide. It’s free and way sharper than any loupe. If you’re using a DSLR lens you may need to hold the aperture pin open. Counter-intuitively wider angle lenses have more magnification, my 12mm f/2 can see right down to the grain on Velvia 50.
Cleaning supplies for dust. Any cheap air puffer and microfiber cloth will work but they’re not strictly required.
USB cable to connect your camera to your PC. I’m using Sony Imaging Edge Desktop, your particular camera brand probably makes a similar application.
Many people recommend anti-Newton’s rings glass, but I’ve found glass to be unnecessary, just get some heavy things to hold down the film at the corners. I use bits of zinc I got from melted pennies but any small heavy things should work.
Raw image processing program. I’m using Adobe Photoshop CS3 here, which is ancient. Photoshop generally only supports cameras made before the release date. However, Adobe makes a program called Adobe Digital Negative Converter which will convert any raw files into a generic DNG format that any version of Photoshop can open.
Distance
You’ll need to start by setting your camera at the right distance from the film. Point it at the film and raise/lower the tripod until it fills the frame. For 6x6 like I have here it will be square, for 135 it should fill the whole frame. Since this is approximate you can leave the film in the sleeve. If you can turn on grid lines on your PC app this can help here. Your film should go between the light pad and the dark mask.
Alignment
To make sure everything is in focus, you need to have your camera perfectly parallel to the film. An easy trick for this is what the mirror is for. Place the mirror on your light pad and align your camera so the reflection of the lens is exactly centered. A grid helps here too. You may need to do several iterations of distance and centering to get everything perfect. Once it’s set up though you don’t need to touch it unless you change film formats (e.g. 135 to 120).
White balance
You’ll need to calibrate your camera for the backlight you’re using. Take your film out and shoot a picture of just the backlight.
Here I’ve placed several color samplers across the diagonal. Set the white balance temperature and tint so the red, green, and blue are equal (pure white). Also set your lens corrections so the lens falloff is compensated for (brightness is equal across the frame). Depending on your lens you may not able to fully compensate for the falloff. You can also do this by looking at the color histogram in the upper right, get the peak as narrow as possible and eliminate the color fringes.
Exposure settings
Put your film in, and hold it down with the mask and whatever you’re using for weight.
Your setup probably looks something like this:
For exposure settings, use the lowest base ISO your camera supports (probably ISO 100). Avoid any trick ‘pulled’ ISOs.
When it comes to aperture, shoot several test shots and see what looks best. You’ll have to balance sharper apertures with diffraction softness. Here’s a spread at f/2.8, f/4, f/5.6, etc. from the center of the frame.
It’s hard to say but either f/5.6 or f/8 looks the best, here’s the corner:
I think f/5.6 looks the best so let’s pick that aperture.
For shutter speed it’s a bit of artistic choice. I compared what I saw on the monitor to what the slide looked like on the light pad. It will also depend on the particular photo as you can compensate for over/under exposure in the scanning process.
I ended up using f/5.6 at 1/6 ISO 100 for 6x6 Fujifilm Velvia 50. Don’t forget that you will have to change the exposure for different formats as macro lenses get darker when focused to close distances.
Mess with the exposure slider in Camera Raw then set that difference on the shutter speed on the camera.
Camera Raw settings
This is also a bit of artistic choice but I found leaving everything as neutral as possible looked the best. Set all the sliders to zero as a base setting, and save that as a preset.
For image settings, generally you want to leave it at the base camera resolution. I turn it down a notch when scanning grainy film like Kodak Tri-X 35mm because the extra pixels aren’t getting you any more resolution.
To save disk space and processing time I usually leave it at 8-bit sRGB, you may want to set it to 16-bit if you take it straight into Photoshop and expect to do some heavy editing. Don’t use Adobe RGB or any other color spaces unless you can control everything all the way up to printing because any slip-up and your colors will look like crap.
You can also crop it here to square or whatever other format you may be shooting.
Tweaking
Really the only tweak I do in Camera Raw is the recovery slider. It will recover blown highlights that are overloading channels. Notice that the bright highlights on the hut are starting to turn glaring yellow and look like pizza cheese or something. There is also a colored triangle in the upper right of the histogram to let you know the highlights are overloaded.
Add a bit on the recovery slider to fix these highlights. Don’t use too much or your picture may end up looking dull and flat. If you find yourself adding too much, speed up the shutter speed on your camera to reduce the exposure and try the scan again, instead of trying to fix it in Camera Raw.
B&W negative
This guide has been for color slide film, which is probably the easiest to scan even though it has a reputation for being hard to shoot. For black and white negative the process is the same except you will need to reduce your exposure as B&W negative is much ‘thinner’. You can also do the inversion here by going to the curves tab. Flip the end points to the opposite side to invert it. You probably also want to add a curve to make things look more natural, here’s a sample of a curve I used.
This is also artistic choice so play around with it until you get something you like. Since negative film is much more forgiving of misexposure you’ll probably need to tweak the curve for each shot.
Color negative
I have shot very little color negative. You can scan it this way too, but you will need to do the color inversion yourself. Photoshop has some curves presets for this, but I found it pretty difficult. I know there are programs out there dedicated to the color negative inversion process. You might try them out but I have no advice there since I’ve never used them.
Lab scans
I used to have my film lab scan all my slides. They were fine, but I didn’t like the lack of control over how it looked (unless I took my film back to the lab for rescanning). If you decide to use lab scans with slide film, at least ask them to not do any color correction. If you’re shooting with filters they’ll probably color correct the filters right out!
It’s much more of a pain but I’ve found the advantages of home scanning to be:
Control over alignment. Instead of having to rotate in Photoshop (with the loss of sharpness), I can rotate the film physically in scanning and correct for any tilt.
Control over exposure. Any wrong exposure and I can make it look just like I want, instead of relying on what the lab tech thought was right.
Better colors. I’ve seen many lab scanners flatten the colors and really lose the subtleties.
Cheaper! Home scanning is free, and you probably already have a suitable camera. Of course you will have to decide for yourself if the time is worth it.
Comparison
So here’s a comparison between a lab scan and a home scan of the same slide.
Lab
Home scan
Your opinion may vary but while the lab scan has better resolution and is sharper, the home scan is properly aligned, has better shadow detail, better color, and doesn’t crop off the edges.
35mm home scan
All the previous scans have been for 120 medium format film, if you want to see what kind of resolution you can get, here’s a full unedited scan of 135 Fujifilm Provia 100F at 24 megapixels:
Happy scanning!
Optimizing NVMe performance with dm-crypt
I recently switched over from Windows 7 to Debian Linux on my main desktop, and along the way decided to set up full disk encryption with dm-crypt because it seemed like support was good, so why not? At the very least it would save me any worry if the drive dies and I had to throw it out. In general I would like to have ‘performance’ more than ‘paranoid’ settings when it comes to tweaks. I basically accepted Debian’s default options on the install and went for it. I also ended up doing dm-crypt-on-LVM for the flexibility of multiple partitions. The drive ended up looking like this:
The problem came when I started running IO-heavy workloads, generally loading large AI models from disk. These only ran at about 1000 MB/s, far short of the 7450 MB/s they promise on the box. I know Samsung probably lies on these benchmarks but not that bad. Unfortunately I can’t remember what I got when testing under Windows 7.
I turned on all the performance options in /etc/crypttab, so the line for the NVMe ends up looking like:
Note that the queue depth 8 sequential test actually comes pretty close to the advertised speed, but the Q=1 test is more like what I was seeing when running actual large loads from disk.
For comparison I ran a (256 MiB) test on the /boot partition, which is outside the dm-crypt volume:
The read speeds are mostly the same, except that important sequential Q=1 benchmark is over 3 times faster! I did a bit of looking around, CloudFlare had a good writeup on optimizing disk encryption speed, and I also found this useful Reddit post. It seems like the sector size dm-crypt is using is important. It may be using 512 bytes, even though the overlying file system (ext4 in this case) is using 4096 so we never use any less than that size. Let’s check what size nvme1n1p3_crypt is using:
We’re using a sector size of 512. It’s also using AES-256, in XTS mode (which is why the key is 2x the size).
I set up a test using my secondary NVMe. This is older and slower (Samsung 980 Pro vs the 990), as well as in the 2nd M.2 slot which means it’s sharing 4 PCIe lanes with the network interfaces, SATA devices, etc. instead of its own dedicated 4 lanes to the CPU.
I formatted this guy up, using the above options, but AES-128 to see if there was any appreciable difference. This is the sequence of commands. Note I’m reading the password from a file (which itself is on the encrypted /home drive).
A little faster, maybe from the smaller key size, but largely the same as above. Let’s try reformatting it with a block size of 4096 using the --sector-size=4096 option when calling cryptsetup luksFormat. Results:
Nearly a 2x speed-up versus the original case! Obviously this is the way to go. For experimentation I tried a sector size of 4096, but with AES-256 to see how much of an effect that has:
A little slower, but still faster with the larger sector size.
So, let’s change the key size and sector size. Thanks to the wonderful cryptsetup, we can actually do this online, on the boot drive, while using it! It even tolerates interruptions (not that I wanted to test this, it’s scary…). The command we want:
# cryptsetup reencrypt --key-size=256 --sector-size=4096 /dev/nvme0n1p3
Enter passphrase for key slot 0:
Auto-detected active dm device 'nvme1n1p3_crypt' for data device /dev/nvme0n1p3.
Finished, time 51m22s, 1862 GiB written, speed 618.6 MiB/s
Alright so not quite double, but an improvement all around, for free! Write performance was also greatly increased. Still short of the unencrypted performance, but still pretty quick.
In summary, if you’re using NVMe drives with dm-crypt, for max performance I would:
Make sure your dm-crypt is using a sector size of 4096
Use a key size of 256 (AES-128 with XTS)
Enable TRIM through the dm-crypt volume with the --allow-discards flag to cryptsetup or discard in /etc/crypttab
Disable workqueues with --perf-no_read_workqueue, --perf-no_write_workqueue flags or
no-read-workqueue,no-write-workqueue options. YMMV with this though so test both (cryptsetup refresh can change it online)
The security implications of the above are left as an exercise for the reader, but personally I’m OK with it.
Oh well it was fun well it lasted, F for my tweeter 2013-2021, another casualty of the ‘rona.
If you are here because you clicked on the link in my profile, you can view the waifu site at chihaya.moe.
Dead site and revival
It’s been over a year since my last post. I suppose it’s sort of neglect, but I’ve not had much that I feel like writing up in a blog post. I am quite active on my Twitter and Twitch stream, so you could follow those.
I’m thinking about revamping the site though and sort of transitioning formats. I have a lot I’d like to write up in a sort of static article/write-up format that wouldn’t fit well in a blog post. It’s going to take a little bit of rework of the code to get it done though. I think I’ll also remove the comment functionality, since it’s been virtually unused (only 2 comments in over 4 years).
Even more cartoon books
Wow more manga opinions nobody cares about.
I finished reading K-On! (けいおん!), K-On! College (けいおん! college), and K-On! Highschool (けいおん! highschool). It’s a fun light-hearted series that I really should have read earlier. The premise is simple, a bunch of high schools girls form a music club and get up to the usual anime antics. Anyway you’ve probably heard of it, and it’s popular for a good reason so go read it!
This month a pre-order I placed months ago for a figurine arrived, along with a couple of others I ordered at the same time. There’s some pictures on my Twitter if you care to see them. Worth it I guess, I’ve got the money. I was surprised nobody I knew passed judgement for gay-ass anime girl figurines.
There’s another couple of currently-publishing mangas I’m reading:
My Senpai is Annoying (先輩がうざい後輩の話) is a cute little heart-warming series that’s being published on Pixiv. It’s one of those tsundere almost-romance stories.
I watched Pop Team Epic (ポプテピピック) as it was airing. If you can’t appreciate some really avant-garde surrealist humor you might not like it. I thought it was pretty good. A lot of crazy meta-jokes. When I first heard about it (through physical advertisements in Akihabara!), I’ll admit I had no clue how they were going to make it into an anime. But they did somehow and it turned out pretty decent. They gave these guys 24 minutes to make whatever they wanted, and it turns out it’s 12 minutes of whatever they wanted but twice. Go give it a shot, you might like it.
Apart from that I’ve just been up to the usual stuff: work and counterstrike. Follow my Twitch channel if you like to watch people play video games instead of playing them yourself. I’ve also got a vacation planned in a couple of weeks to Las Vegas/Grand Canyon/the Southwest, so maybe that will be fun.
More cartoon book reviews
I wanted to write an update on the stuff I’ve been reading so…
I finished reading the main series of Nichijou (日常). It’s a great light-hearted comedy manga, but if you can’t appreciate the absurdist kind of humor it features you might not like it, it took me a bit to get into it. If you’re looking for something fun to read I’d totally recommend it. I was something I enjoyed reading during those isolated evenings down in the Mojave desert. The manga almost seems like it was written to be made into an anime with how animated it is. I haven’t watched it though, maybe sometime soon. Helvetica Standard (ヘルベチカスタンダード) is like the DVD bonus features for the manga, I picked it up and you should too if you liked it.
I finished all six volumes of Mysterious Girlfriend X (謎の彼女X ‘Nazo no Kanojo X’) as well. It’s a bit of a longer read but if you wanted to read a romance manga I’d absolutely recommend it. Unlike some others I’ve read I liked how it set the story up for drama but instead of things turning bad everything resolves in a nice wholesome manner, it was almost refreshing. The story was kind of slow and doesn’t make a lot of progression so if you wanted a riveting story that keeps you going for the next volume you might not like it. On the other hand, if you want a sweet, loving, fun story to read you’ll like it as much as I did. There’s an anime too but I haven’t seen it. Considering how many volumes of manga there were I would imagine they cut out quite a bit.
I’m up to volume 4 of Aho Girl (アホガール). I’ll admit I’m only reading it because of the memes. If you want a fun 4-koma comedy manga it’s pretty good.
K-On! (けいおん!) is another series I started reading. It’s a nice fun little manga with cure girls doing cute things. It’s only four thin volumes so it’s not terribly long.
I also picked up a bunch of doujins at Comiket 93 when I was in Japan over Christmas. It was super cool but I don’t really have any reviews to write.
HTTPS
I got HTTPS working on all my website thanks to Let’s Encrypt! Props to them for being free and painless (except trying to figure how to get this to work with vhosts, that’s my fault).
Photo gallery
Since I’ve been getting into photography I’ve put some of my favorites in a gallery go check it out here.
Chinese cartoon books
I wanted to do a writeup on the mangas I’ve been reading. Since I’ve been spending most of my time in the Mojave desert (what I call the shit-ass desert), I’ve had spare time to read these. As much as I’ve been willing to carry in my backpack anyway, but I’ve got good at traveling light.
I’ve been reading No Matter How I Look at It, It’s You Guys’ Fault I’m Not Popular! (私がモテないのはどう考えてもお前らが悪い! ‘Watamote’) since the English release started in 2013 and it’s been as entertaining as ever. Whether you consider that a good or bad thing, but it’s consistent. Funny but tough to read at times since the authors are so good at getting that cringy feeling. My only hope is that they come to a satisfying conclusion, better than petering out or choosing some cop-out ending.
I picked up Nichijou (日常) for reasons I can’t remember. It took me a bit to get into its absurdist sense of humor but it’s pretty funny once you get past the expectation that it’s supposed to make sense. It’s something fun to read at the airport.
I picked up the first volume of Your Name (君の名は ‘Kimi no Na wa’) but I haven’t read it yet since I think I should watch the movie first. I’ve heard it’s really good so I’m looking forward to it. I’ve really liked Shinkai Makoto’s previous films. ‘Looking forward to it’ but the only reason I haven’t seen it is due to my laziness lol.
I read the manga version of 5 Centimeters Per Second (秒速5センチメートル ‘Byousoku 5 Centimeter’) . It’s quite a bit longer than the anime and expands the story a couple of chapters. Maybe it’s because I’m in a different place in my life now, or maybe because the manga expanded a lot on the anime, but it hit me a lot harder emotionally. I’d really recommend it. Watch the anime first for the beautiful visuals, but read the manga for the story. The final chapter really made it, a much more positive ending, or at least more ambiguous and not as negative.
On the recommendation of PaperChazz I’ve been reading Mysterious Girlfriend X (謎の彼女X ‘Nazo no Kanojo X’). I’d agree with him that it’s a really great romance manga. If you just read the synopsis of the story it might seem like this weird drool-centric story, but it’s really great. I’m on volume 4 right now. If it seems interesting to you go check it out.
That’s all I can think of for now.
Things
I have a new domain name: chihaya.moe. Something coming there soon.
I’ve been down in the Mojave desert most of the time.
This sucks.
Follow my twitter for more frequent updates @crazyfarmsexy.