<?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: Abdullah Khan</title>
    <description>The latest articles on DEV Community by Abdullah Khan (@passlens).</description>
    <link>https://dev.to/passlens</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3955396%2F95d182a5-85a9-42ba-8f0f-6a7b6eb0f866.jpg</url>
      <title>DEV Community: Abdullah Khan</title>
      <link>https://dev.to/passlens</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/passlens"/>
    <language>en</language>
    <item>
      <title>Document photos are a tiny image-processing problem with sharp edges</title>
      <dc:creator>Abdullah Khan</dc:creator>
      <pubDate>Thu, 28 May 2026 01:06:15 +0000</pubDate>
      <link>https://dev.to/passlens/document-photos-are-a-tiny-image-processing-problem-with-sharp-edges-19b4</link>
      <guid>https://dev.to/passlens/document-photos-are-a-tiny-image-processing-problem-with-sharp-edges-19b4</guid>
      <description>&lt;p&gt;Disclosure: I work on Passlens, a browser-first passport and ID photo maker. This post is about the product decisions behind that workflow, not a neutral review of every tool in the space.&lt;/p&gt;

&lt;p&gt;A passport photo looks simple until you try to make one that an upload form will actually accept. It is a headshot, yes, but it is also a small chain of constraints: physical size, pixel size, background, head position, print scale, and whatever the destination country's portal decides to reject that week.&lt;/p&gt;

&lt;p&gt;That is why generic photo editors feel slightly wrong for this job. They can crop. They can resize. They can export. The hard part is not any one of those actions. The hard part is keeping all of them tied to the document rule the user picked.&lt;/p&gt;

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

&lt;p&gt;For developers, document photos are awkward because two units matter at the same time.&lt;/p&gt;

&lt;p&gt;A user may need a 2x2 inch passport photo. A visa portal may ask for 600x600 pixels. A print sheet may need 35x45 mm photos at 300 DPI. These are not the same request, but people often treat them as if they are.&lt;/p&gt;

&lt;p&gt;If the app only thinks in pixels, the print can come out the wrong physical size. If it only thinks in millimetres or inches, the digital upload can be rejected for the wrong pixel dimensions. A good workflow has to keep both ideas alive: the document size and the export target.&lt;/p&gt;

&lt;p&gt;That is the main reason Passlens keeps presets and print layouts as first-class pieces of the workflow instead of treating them as labels on a crop box.&lt;/p&gt;

&lt;h2&gt;
  
  
  The crop is not the output
&lt;/h2&gt;

&lt;p&gt;Another small trap: the crop the user sees is not always the final output.&lt;/p&gt;

&lt;p&gt;For a digital upload, the crop usually becomes one image file. For printing, the same crop may become several photos arranged on 4x6, A4, or Letter paper with spacing, margins, and optional cut marks. If that print sheet is scaled by the browser or printer dialog, the whole thing is wrong.&lt;/p&gt;

&lt;p&gt;So the editor needs to separate three things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the face and shoulder crop&lt;/li&gt;
&lt;li&gt;the finished document-photo size&lt;/li&gt;
&lt;li&gt;the print sheet or digital export format&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That separation is less glamorous than a big feature list, but it is what makes the final file usable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Local by default matters here
&lt;/h2&gt;

&lt;p&gt;Passport and ID photos are personal. They are not abstract test images.&lt;/p&gt;

&lt;p&gt;For that reason, the basic Passlens flow runs in the browser by default. Users can pick a preset, line up the crop, adjust the background, and export without creating an account. Heavier background cleanup is optional, and it is described as a separate choice instead of being hidden behind the button.&lt;/p&gt;

&lt;p&gt;That does not make the product perfect. Document rules still vary, and official guidance sometimes leaves gaps. But the workflow should make the tradeoff visible: keep routine editing local when possible, and only use server processing when the user chooses it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this became a product
&lt;/h2&gt;

&lt;p&gt;The first version of this kind of tool is easy to underestimate. You build a cropper, add an export button, and think you are close. Then the real edge cases show up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a user needs 35x45 mm but the printer wants a 4x6 inch sheet&lt;/li&gt;
&lt;li&gt;another user has a 600x600 upload requirement and no idea what DPI means&lt;/li&gt;
&lt;li&gt;someone prints from a browser dialog that scales the PDF to fit&lt;/li&gt;
&lt;li&gt;a background color rule is stricter than the person expected&lt;/li&gt;
&lt;li&gt;a travel document has a size that does not match the common passport presets&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is the product surface. Not a fancy filter. Not a photo gallery. Just a pile of boring constraints that need to stay boring for the user.&lt;/p&gt;

&lt;p&gt;If you want to try the workflow, the free editor is here: &lt;a href="https://passlens.com/passport-photo-maker" rel="noopener noreferrer"&gt;Passlens passport photo maker&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I also keep coming back to a few practical pages when thinking about the UX:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://passlens.com/passport-photo-print-layouts" rel="noopener noreferrer"&gt;passport photo print layouts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://passlens.com/passport-photo-size-in-pixels" rel="noopener noreferrer"&gt;passport photo size in pixels&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://passlens.com/passport-photo-background-color" rel="noopener noreferrer"&gt;passport photo background color&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The lesson for me is simple: small image tools are only simple when the output does not matter. The moment a government form, a print shop, or a visa appointment depends on the file, the boring details become the product.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>privacy</category>
      <category>productivity</category>
      <category>imageprocessing</category>
    </item>
  </channel>
</rss>
