Category: English

  • Comparing Analog and Digital Film

    A few weeks back, I took my analog camera — a Canon AE-1 Program — for a walk in Haugesund, a city on the west coast of Norway.

    I also brought along my Canon 5D Mark II for three reasons:

    1. Take comparison shoot (which we will look at today)
    2. Verify that the light meter in the AE-1 is working correctly (it is)
    3. Be able to take more pictures once the 24 frames were used.

    Just to get the technical out of the way.

    Canon AE-1 Program:

    • Fujifilm Superia 200 film, 24 frames
    • 50mm f/1.8 lens

    Canon 5D Mark II:

    • RAW and JPG
    • Kodak Portra 160 NC picture profile for the JPGs
    • 50mm f/1.4 lens
    • ISO 200 to match the film speed on the AE-1

    Regarding the picture profile; the Kodak Portra 160 is from the 158 pack of picture profiles from Cinescopophilia. I have written about picture profiles earlier.

    In the images below I have only used the RAW files and applied both the picture profile that was set in camera and the standard picture profile that comes with the camera using Canons Digital Photo Professional program.

    I chose these images because of the colors. I do not believe they are masterpieces on their own.

    Analog on the left, or top. Digital images on the right, or bottom.

    I tried some of the picture profiles in the 158 pack, but none of them got close to the colors produced by the Fujifilm Superia.

    It’s quite distinct, no doubt about it.

    Once again it is easy to spot the difference.

    The analog picture seems brighter, even thought the settings are identical. So either the film is a bit more sensitive, it has been processed slightly differently, or the light meter is a bit off.

    Since I took the images in RAW, I could try to push the exposure a bit to see if I can get a better match. However, I still don’t think it will match the colors. Especially on the blue in the first picture.

    I also tried to do a double exposure, but that failed twice.

    First, the double exposure was way off. Not even worth showing the image, it’s just a mess.

    Secondly, I was not able to align the frame correctly, so the double exposure was both on the frame I intended to double expose, and part of the next frame, as show in the image below.

    I think the Fujifilm Superia 200 has the “look and feel” of the 90s. It also handles overexposure a lot better than its digital counterpart.

    The next film I will be shooting is the Kodak Gold 200. I will try to do the same exercise where I take the same shots with the Canon 5D Mark II with the same settings and compare them.

    I’m also thinking about getting my hands on the Kodak Portra 160 since I have at least 3 picture profiles that claim to be close to that film.

  • Project Hail Mary

    I finally watched Project Hail Mary last night.

    My plan was to watch it on the big screen, but then— Well, I hardly need to explain the concept of time.

    It was good, the movie, but the book was better. It almost always is. Especially if you read the book first.

    And some books, when read after watching the movie adaptation, is a whole new story. Like “The Lost World” by Michael Crichton. Since the screenplay of “Jurassic Park” diverged so much from the book, there was no way to unify the sequel book and film.

    You can read the book and watch the movie, or vice versa, and be left with two completely different stories. Both good, just different. I can strongly recommend it. Start with Jurassic Park, that way you will learn something new about the man who spared no expense.1

    I read Project Hail Mary back in 2022. Borrowed from my sister. I liked it so much I bought a copy for myself. If there is one thing I like better than owning a good book, it is owning a great book.

    And since I bought the book before the movie adaptation, I have the original cover, not one boosting “Now a major motion picture” on the front or a picture of Ryan Goslings face.

    Not that there is anything wrong with Ryan, but I do not really care for the tactic of changing book covers once a book has been turned into a movie. I understand it, but I am not sure if it sells more books.

    If anything it might remind people to stream the movie when they get home. Or forget it once they turn around like a normal person.

    In summary: Read the book, watch the movie. They are both good, but one is better than the other.


    1. Regarding nummer 4 in the YouTube video. They really missed an opportunity by not using “the voice of” David Attenborough, the brother of the actor who played John Hammond, Richard Attenborough. ↩︎
  • Shooting Analog Film in 2026

    I’ve spent the better part of the summer isolated at home due to a rather nasty virus. However, recently I have been feeling well enough to go for short walks, and on one such occasion I decided to bring along my Canon AE-1 Program — an analog film camera — with a 50mm f/1.8 FD lens. A classic combination.

    In the camera I had a roll of Fujifilm Superia 200, 24 frames, that was stored in my fridge for a few years. Could be anything from 2–6 years. I don’t remember.

    I also brought along my Canon 5D — I think it sounds better than my 5D mark II — paired with a 50mm f/1.4 EF lens. On this camera I shot both RAW and JPG, where the JPG was processed with a Kodak Portra 160 picture style in camera.

    Yes, you can install different picture styles on newer Canon cameras. And by newer I mean from late 2005, like the classic Canon 5D, but not early 2005, like the Canon 350D. More on picture styles later.

    Some of the shots I took with both cameras, and I am looking forward to compare the results. But for the most part I just used the analog camera.

    Using a analog camera, in manual mode, with manual focus, forced me to slow down. Everything had to be checked and double checked. Focus. Exposure. Framing. There is no way to check the result on a screen and try again.

    And yes, I know the AE-1 Program has a program mode — it’s in the name. But I like to shoot in manual, I do so on my digital cameras as well, except for the OM System TG7. But that’s for a different kind of shoot, where time is not on your side.

    My first DSLR

    This experience made me curious, so I charged the battery on my Canon 350D — my first DSLR — and took it for a walk as well.

    The 350D, as mentioned above, does not support picture styles. You can, however, tweak some parameters, which I did after doing some simple research. Well, used an internet search engine to be more precise.

    The shutter sound on the 350 is what I would call “light and cheerful”. It has a smaller sensor, and thus also a smaller mirror and shutter curtain. But it’s noticeable slower writing files to the CF-card than the 5D.

    I also have the 5D mark II, and for some reason this camera sounds different from the original 5D. To be honest, I’m not a fan of the shutter sound at all.

    Camera equipment

    The danger of picking up and using all my cameras is of course that I now suddenly find myself searching for more camera equipment. And that is a deep, and expensive, rabbit hole.

    So far I have looked for other Canon EOS analog cameras, because I have already invested in EF lenses, only apparently not enough, because I’ve also been searching for lenses. Especially prime lenses, like this beautiful Canon 50mm f/1.2.

    Also, after a few YouTube videos, I have searched for Leica, especially the Leica M6, which seems to be the holly grail of Leica film cameras.

    I guess it would make more sense to buy a digital Leica M, like the M9 or M10, but damn it is expensive. However, it would make me one of the cool kids. Yes, I know that the Leica M11 is the newest, but if the M9 is expensive used…

    Picture Styles

    Since you asked.

    A few years ago, I discovered a site with 158 Canon dSLR Picture styles picture profiles. Here is how to install the picture styles, or, if you prefer, a YouTube video on how to install picture styles on Canon.

    Thomas Fransson, from the YouTube video linked above, also makes his own picture styles, which you can download for free — or you can give a small donation.

    A quick note: The picture styles from Thomas is in the pf3 format, which is only supported on cameras from 2007 and onwards — like the 5D mark II, but not the 5D classic. The 5D classic support only the pf2 format. However, cameras that support pf3 also support the pf2 format.

    On the Canon 5D I have installed the following picture styles at the moment:

    • Fuji Velvia
    • Kodak Portra 160
    • BW_5

    And on the Canon 5D mark II, I have these:

    • Fulji Velvia
    • Kodachrome 25
    • BW_5

    They are all from the 158 pack I mentioned.

    Just to make it clear; the picture styles installed on the Camera only affects the JPG images. It does not affect RAW images, so if you want to actually get any effect, you have to shoot JPG (you can shot both RAW + JPG) — or apply them in post using Canons software.

    The pictures

    Well, sadly, the 1-hour photo lab seems to be out of fashion, so I just have to wait to get the pictures back. I was told it could take up to 3 weeks.

    For the digital photos; I was not that happy with them. Not from the 5D or the 350D. Which can mean only one of two things: I’m a bad photographer, or it’s the equipment. So, obviously, I’m still looking at Leica M-series online.

    I might share the images once I get them back from the lab. I still have faith in them.

    Then I will probably also show the comparison with the pictures I took with the Canon 5D from the same location and with the same settings.

  • What metadata does malloc need?

    I read this article via Hacker News, where Senthilnathan explains why, if you want to allocate 13 bytes, it allocates more behind the scenes.

    He writes that what you end up with, after running malloc, is this:

    +----------------+
    |     Header     |
    +----------------+
    |    Variable    |
    |    padding     |
    +----------------+
    |  Back pointer  |
    +----------------+
    |  User memory   |  <- Pointer returned by malloc
    +----------------+

    But this, I have to point out, is his own implementation, which he shows in the article. Glibc uses a different implementation. I wrote a memory allocator back in 2014 which used yet a different layout.

    In short; Senthil creates a header (basically the size of request), a variable padding (which is not properly explained), and a back pointer that points back to the header.

    So when the memory is freed, free() can take the pointer (user memory), go one step back and use the back pointer to find the pointer to the original header that contains the size of the block, including the size of the padding, and free it properly.

    Regarding the variable padding, Senthil write: “it needs to hand back a pointer that’s correctly aligned for whatever type the caller is about to store there.” and “depending on what alignment was requested.”

    However, malloc doesn’t know the type that the caller is planning to store. It takes one argument, and that is the number of bytes requested. It does not ask for alignment.

    Luckily he links to the code in Github, and it seems he has made his own allocator that does take alignment as an argument, which means that this is not an implementation of malloc at all.

    My 2014 implementation of malloc

    I made a memory allocator back in 2014 as part of a course.

    The course went into topics such as CPU cache lines, memory allocation, and how to create payloads in machine code that could be used in buffer overflow attacks. Fun stuff.

    My memory structure looked like this:

    +----------------+
    |  sizeAndTags   |
    |   (header)     |
    +----------------+
    |      next      | <- Pointer returned by malloc
    +----------------+
    |      prev      |  next, prev and the boundary tag
    +----------------+    is only used once the memory
    |    space and   |          block is freed
    |     padding    |
    |       ...      |
    +----------------+
    |  boundary tag  |
    |   (footer)     |
    +----------------+

    struct BlockInfo {
      size_t sizeAndTags;
      struct BlockInfo* next;
      struct BlockInfo* prev;
    };

    So with a request for n bytes, if the request is less than MIN_BLOCK_SIZE (BlockInfo + footer), I allocate MIN_BLOCK_SIZE, otherwise I make sure to round the request up to correct ALIGNMENT.

    #define WORD_SIZE sizeof(void*)
    #define MIN_BLOCK_SIZE (sizeof(BlockInfo) + WORD_SIZE)
    #define ALIGNMENT 8

    By rounding up, I do not need the “variable padding” Senthil uses, nor the back pointer.

    The memory I give out is correctly aligned, always, and it is also big enough to contain the information needed once it is inserted into the free list.

    If you request 13 bytes, the allocator will hand out 16 bytes. But the caller doesn’t know this, all it knows is that it has a pointer to memory that is at least 13 bytes, as requested.

    Since I used 8 as ALIGNMENT, I am free to use the lower 3 bits of sizeAndTags for, well, tags. I used “TAG_USED” (this memory is in use) and “TAG_PRECENDING_USED” (the adjacent memory preceding this one is in use).

    There is also a macro, SIZE, to get the correct size by masking out the 3 lower bits of sizeAndTags.

    #define SIZE(x) ((x) & ~(ALIGNMENT - 1))

    The boundary tag — in use when on the free list — is the size of the block (same as sizeAndTags), so you can go backwards and find the start of the memory block.

    That’s why we have the TAG_PRECEDING_USED. If this is set to 0 on a block we are freeing, we can safely assume that the preceding block in memory has a valid boundary tag that we can use.

    This also means we have to update this tag if the memory adjacent is allocated from the free list.

    The boundary tag is used for coalescing. Merging two free adjacent memory blocks into one bigger memory block. Senthil explains this well in his article.

    I remember spending a lot of time with pen and paper visualizing the memory layout and the pointer arithmetic.

    When I worked on this, the structure of the memory block itself was not the interesting part. The exercise was to make an implementation that performed well. Both in speed and in memory utilization.

    When and how long to search the free list for best fit, when to split a memory block from the free list, and whether to use the head or tail end of said split.

    The course supplied test cases with various memory allocations. 9 tests in total. My results, that I submitted before the deadline, ended up like this:

    Random, alternating big and small allocations, many small allocations, many free operations and back to big allocations to stress test coalescing and memory fragmentation.

    It turns out that memory fragmentation is a real thing, and you have to take care to minimize its impact.

  • The Glorified Search Engine Kills Again

    I’ve heard people say, “I don’t use search engines, I just ask AI”. And I get it. It’s easy. If you use Google, the first result is always Googles AI, Gemini, replying.

    Earlier this week, Apple announced that it would remove support for CoreStorage. So I Googled — in other word asked Gemini — to refresh my memory. Ah, yes, it’s the container Apple used to introduce, among other things, encryption to its old HFS+ file system.

    After going down that rabbit hole, asking more and more questions about HFS, HFS+ and the current APFS, I pivoted and asked a new question.

    In a new session, I asked about freelance photographer Chris Weeks, which I used to follow on DeviantArt1.

    At that time — around 2005–2010 — I was fascinated by Leica cameras, but also Chris’ ability to capture photographs of people like Jack Nicholson, John Malkovich, Brad Pitt, Natalie Portman, a homeless dog, and many, many more.

    He also had a distinct writing style which told the stories behind the photos.

    So I asked Google Gemini what Chris Weeks, the street photographer, is doing now. I can’t remember the exact question, but I do have the exact answer I got back.

    Chris Weeks, the renowned freelance editorial and street photographer, passed away at the age of 44 from colon cancer. In June 2017, shortly before his death, his wife and community organized a touching event where he was able to share a “wedding” dance with each of his three daughters

    Oh no! But it does explain why his Deviant account has been inactive since 2012.

    Only, I knew he had one daughter, not three. So I asked about the source, then wrote back that the image of this Chris Weeks did not look like the image of the other Chris Weeks. Also there where no mention about his photography at all.

    You are completely correct to point that out, and thank you for catching that error.

    The MPR News article is about a different man named Chris Weeks—a 12-year U.S. Army veteran from Wylie, Texas, who tragically passed away from colon cancer in 2017. He was not the street photographer.

    And

    I apologize for the confusion caused by combining their identities. Thank you again for flagging the discrepancy in the link!

    The things is; when using a search engine, you can pretty much understand that these are two different people based on the context, while the AI will happily mush two or more sources together and announce it as fact.

    In the end, I found the Chris Weeks I was looking for. But with no help from Gemini.

    So once again; be careful of using AI as a search tool. Especially when it comes to names and people. It might kill2 someone in the process.


    1. I logged into my DeviantArt account, and it has turned into an AI generated slop fest. There is a section called “today’s challenge” (#icecream), and I could not find one authentic image. Lots of AI nudes eating ice cream though. ↩︎
    2. When Snapchat introduced its AI a few years back, it managed to kill a Norwegian princess. “It was very tragic”, it said. Tragic indeed. ↩︎