<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Daisuke Mino</title>
    <description>The latest articles on DEV Community by Daisuke Mino (@minodisk).</description>
    <link>https://dev.to/minodisk</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F42106%2Fb2f24bef-561c-46b6-8f9d-dfd64f8f9f8b.jpg</url>
      <title>DEV Community: Daisuke Mino</title>
      <link>https://dev.to/minodisk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/minodisk"/>
    <language>en</language>
    <item>
      <title>lapse: Keep Burst Photos in Order on Google Photos</title>
      <dc:creator>Daisuke Mino</dc:creator>
      <pubDate>Thu, 09 Jul 2026 14:45:37 +0000</pubDate>
      <link>https://dev.to/minodisk/lapse-keep-burst-photos-in-order-on-google-photos-249e</link>
      <guid>https://dev.to/minodisk/lapse-keep-burst-photos-in-order-on-google-photos-249e</guid>
      <description>&lt;p&gt;I built &lt;a href="https://github.com/minodisk/lapse" rel="noopener noreferrer"&gt;lapse&lt;/a&gt;, a small CLI tool that makes the EXIF timestamps of burst-shot JPEGs unique so that Google Photos displays them in the order they were shot.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;When you shoot a burst, many frames land within the same second. Cameras record the sub-second part in EXIF (&lt;code&gt;SubSecTimeOriginal&lt;/code&gt;), but Google Photos ignores it — so photos taken in the same second lose their shooting order after upload.&lt;/p&gt;

&lt;h2&gt;
  
  
  What lapse does
&lt;/h2&gt;

&lt;p&gt;lapse walks through the JPEGs in a directory in natural filename order (&lt;code&gt;image_2.jpg&lt;/code&gt; before &lt;code&gt;image_10.jpg&lt;/code&gt;) and assigns each file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;new time = max(original time, previous file's new time + 1 second)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first file keeps its original time. Only frames collapsed into the same second get pushed forward, one second at a time; separate scenes with real time gaps keep their original capture times. The result is monotonically increasing timestamps that match the filename order — which is enough for Google Photos to sort them correctly.&lt;/p&gt;

&lt;p&gt;Files that already have unique timestamps are not touched at all, so re-running is idempotent. It's a destructive operation by nature, so there's a &lt;code&gt;--dry-run&lt;/code&gt; flag to preview the rewrites first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Preview (no rewriting)&lt;/span&gt;
lapse &lt;span class="nt"&gt;--dry-run&lt;/span&gt; /path/to/photos

&lt;span class="c"&gt;# Run&lt;/span&gt;
lapse /path/to/photos
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Lossless by construction
&lt;/h2&gt;

&lt;p&gt;The part I cared most about: lapse never decodes or rebuilds the JPEG. It patches the date-time tag values (fixed 19 bytes each) in place inside the APP1 segment, so every other byte — including the image scan data, GPS tags, and MakerNote — is bit-identical before and after. Writes go to a temporary file followed by an atomic rename, so a crash mid-write can't corrupt the original.&lt;/p&gt;

&lt;p&gt;This is also why it's a pure Rust implementation with an in-house minimal TIFF/IFD parser instead of depending on ExifTool or EXIF-writing crates: general-purpose writers rebuild segments and risk corrupting MakerNote offsets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Prebuilt binaries for Linux, macOS, and Windows are on the &lt;a href="https://github.com/minodisk/lapse/releases/latest" rel="noopener noreferrer"&gt;Releases page&lt;/a&gt;, or build from source with Cargo. If you shoot bursts and organize them in Google Photos, give it a try.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>cli</category>
      <category>photography</category>
    </item>
  </channel>
</rss>
