{"id":1753,"date":"2023-07-04T20:47:34","date_gmt":"2023-07-05T03:47:34","guid":{"rendered":"https:\/\/www.skierpage.com\/blog\/?p=1753"},"modified":"2025-10-27T19:53:00","modified_gmt":"2025-10-28T02:53:00","slug":"software-fixing-scanned-photos-in-gimp","status":"publish","type":"post","link":"https:\/\/www.skierpage.com\/blog\/2023\/07\/software-fixing-scanned-photos-in-gimp\/","title":{"rendered":"software: fixing scanned photos in GIMP"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I received boxes full of old family pictures that were cropped with the old selection tool of &#8220;Physical scissors&#8221;. Here are my notes on how I scanned them and neatened them up.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Scanning<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Arrange multiple pictures on all-in-one printer&#8217;s scanner bed and scan them.<br>Clean the scanner glass each time due to sticky stuff<br>Copy each page of scans to Pictures\/date folder\/box<em>NN<\/em>_photo_scans_<em>XX<\/em>.jpg<br>Do a quick crop in the KDE image tool Gwenview if it&#8217;s got lots of white space.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">GIMP!<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Open the image in the fun free powerful open-source GIMP image editor. I use the GIMP 3.0 beta pre-release, <a href=\"https:\/\/www.gimp.org\/downloads\/devel\/\">download it here<\/a>. The downside is many tutorials and guidelines on the web are for previous versions of GIMP, but that&#8217;s true even if you use the stable version 2.10.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Crop and straighten<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Roughly crop to what you want<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Press R for rectangle select, roughly select a picture.<br>Image &gt; Crop to Selection<br>Press Ctrl+Shift+J so the picture fills GIMP&#8217;s window.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Straighten the scan<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">You can drag out some guidelines from the ruler to help get right rotation. Straighten out the picture with Image &gt; Transform &gt; Arbitrary Rotation\u2026 : Roughly drag with the mouse, then use arrow keys for slight adjustments, then click Rotate.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Update 2025:<\/em> the old thread <a href=\"https:\/\/gimpchat.com\/viewtopic.php?f=4&amp;t=14972\">Straightening a Scanned Image<\/a> gives several other techniques and good advice. It&#8217;s probably easiest to use Tools &gt; Measure (Shift+M), draw a measuring line on one of the edges, then click Straighten.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the photo is warped, you might need to &#8220;square&#8221; it up. More details below.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Make a tighter crop<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Press R for rectangle select, make tighter selection<br><em>TODO<\/em>: For a recent square picture, why don&#8217;t tools like Image &gt; Crop to Content and Image &gt; Zealous Crop cut out the white around the image for me?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Instead, you can use the Tools &gt; Selection Tools &gt; Fuzzy Select tool; since Image &gt; Crop to Selection will crop to its rectangle, you don&#8217;t have to be accurate unless an entire edge of the picture is white enough to look like the white background of the scanner. So,<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the Fuzzy Select tool&#8217;s Tool Options, set a fairly high threshold (15?) You probably don&#8217;t want Antialiasing and Feather edges. I <em>think<\/em> you want Select transparent areas <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click in the white border. This should mostly select the white border.<\/li>\n\n\n\n<li>Select &gt; Invert to instead select the picture.<\/li>\n\n\n\n<li>You could at this point use Selection &gt; Shrink&#8230; to shrink the selection by a few pixels to get rid of the random pixels of shadows and bleed along the edge of the photo, although I find each edge has more or less &#8220;bad&#8221; pixels.<\/li>\n\n\n\n<li>Image &gt; Crop to Selection<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If this doesn&#8217;t wipe out must of the white surround, you could Undo a few times to get back to the selected white surround, then use the Rectangle Select Tool in add to selection mode to add the white strip.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Optional: unwarping<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If at this point you have thin triangular strips of white or alpha pixels around some edges, you can either forget this obsessive desire to preserve as many pixels of a crappy old snapshot as possible, or try to unwarp the scanned photo into a perfect rectangle. Maybe the easiest tool to use is Tools > Transform Tools > Perspective. Set it to Transform layer, Direction to Corrective (backward), Clipping to Crop to result. Then zoom in (Ctrl+Mouse wheel) on each corner of GIMP&#8217;s canvas and drag each diamond to the corner of the photo, and click Transform. In GIMP 3.1 this leaves a &#8220;Floating layer (transform)&#8221; because it&#8217;s a non-destructive edit; I think you can leave this, or right-click on it in the Layers panel and choose Anchor layer.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Spot repair<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If the picture&#8217;s messed up, repaint it. I mostly used the healing brush, press H.<br>Press + to zoom in on the dust spot<br>I don&#8217;t understand brushes well, I mostly used the pixel brush<br>I mostly used high opacity to paint out the spot instead of having to click multiple times..<br>Adjust the brush size to match the size of the glitch.<br>Now Ctrl+Click somewhere near the spot that&#8217;s about the same color to set a heal source. If you have a big brush, choose something that has the right flow.<br>Click to repair the spot.<br>Click more to repair nearby stuff.. If you start repairing with wrong pixels, Ctrl+Click somewhere else to set a new heal source<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Unfading colors<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Strategy: Try various things in GIMP&#8217;s Colors menu. Undo-Redo are your friend \u2013 Ctrl+Z, Ctrl+Y.<br>Try the Colors &gt; Auto fixups. When in doubt Undo. I found only &#8220;White Balance&#8221; was useful.<br>The main tool I used is Colors &gt; Levels, it is gold.<br>For 1950s B&amp;W image, stick to the Values channel. If color histogram is zero at the ends, then drag the pointers and move them inward. This will fix the colors.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For 1960s color images that have a reddish cast, they tend to have oversaturated reds, greens that turned brown, and blues that turned gray; do the level adjustment for each color. Red hit the max in the histogram some way in from the left end before 0 then dropped off, so similar Levels adjust as with B&amp;W drag the left pointer to the start of the Red values.<br>Then do the other colors. I found these tended to have a better spread of colors, so drag the middle slider slightly to beef up the blues and greens.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For 1980s color images, the whites are often overwhite and the blacks are all black. I didn&#8217;t have much luck with Colors &gt; Instead use Colors &gt; Curves\u2026 (you can get there from Colors &gt; Levels by clicking [Edit these Settings as Curves]. In Curves, drag the bottom of the diagonal line up (to spread out the blacks more, and drag the top of the line down (to reduce the overwhite).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Export the individual JPEG picture, and repeat<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">File &gt; Export As\u2026 come up with a good name for the file ending in <code>.jpg<\/code>, uncheck Save Exif Data and Save XMP data. Scans don&#8217;t have a lot of useful info about the lens used or anything like that.<br>I left Save thumbnail and Save color profile checked, and blanked out any comment inserted by my scanner.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Click the Export button in the dialog&#8217;s title bar (not [Save Settings], that just remembers the options you chose for JPEG export.)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then Ctrl+Z or use the Edit history women to undo all the way back to the page of scanned photos, and repeat for the other photos on the same scan.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Should I still be saving JPEG images?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I exported the cleaned up scans as JPEG. The problem with JPEG is it doesn&#8217;t support alpha (transparency). So when you delete the white background &#8220;behind&#8221; a scan, it can&#8217;t be represented as transparent, the blank pixels have to have a color. That&#8217;s a hassle if you&#8217;re eventually going to put the picture on a colored background, you&#8217;ll have slivers of white where you want to see the background. I probably should have exported to the WebP format, which most browsers support, which does support transparent pixels.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There is endless campaigning for browsers to support other image formats; I remember the <code><a href=\"https:\/\/en.wikipedia.org\/wiki\/Multiple-image_Network_Graphics\">.mng<\/a><\/code> wars of the 1980s. People want browsers to show HDR images, more detailed images with 10-bit RGB pixels instead of 8, and images with even greater compression; the problem is there are <a href=\"https:\/\/en.wikipedia.org\/wiki\/Comparison_of_graphics_file_formats#Technical_details\" data-type=\"URL\" data-id=\"https:\/\/en.wikipedia.org\/wiki\/Comparison_of_graphics_file_formats\">multiple new image formats<\/a> offering these features, including multiple newer versions of JPEG such as Jpeg2000 and now JPEG XL.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Presenting a slide show&#8230; in PowerPoint!<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I wanted to put some of these photos on tablets for a family get-together. There is or was a way to set the Windows screen saver to be a slideshow of pictures in a particular directory, but I couldn&#8217;t figure out how to do the same on an Android tablet. It turns out PowerPoint has an automatic slideshow mode with auto-advance. I don&#8217;t have PowerPoint or pay for any part of Microsoft Office, but I was able to put all the pictures into the presentation program <a href=\"https:\/\/www.libreoffice.org\/discover\/impress\/\">Impress<\/a> of the free and open source LibreOffice office productivity suite. I fiddled around with the slide master, added a caption to many slides, and in the Slide Transition for every slide I set Advance slide to &#8220;After 6 seconds&#8221;. I saved this as a <code>.pps<\/code> (PowerPoint Show) file that starts in autoplaying mode. Then I loaded the slideshow onto tablets on which I had installed Microsoft&#8217;s free mobile version of PowerPoint for Android, put a link to the slideshow titled &#8220;CLICK ME&#8221; on the Android home screen, and if people did so the tablet would sit there running the slide show.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I received boxes full of old family pictures that were cropped with the old selection tool of &#8220;Physical scissors&#8221;. Here are my notes on how I scanned them and neatened them up. Scanning Arrange multiple pictures on all-in-one printer&#8217;s scanner &hellip; <a href=\"https:\/\/www.skierpage.com\/blog\/2023\/07\/software-fixing-scanned-photos-in-gimp\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[14,18],"tags":[37],"class_list":["post-1753","post","type-post","status-publish","format-standard","hentry","category-open-source","category-software","tag-gimp"],"_links":{"self":[{"href":"https:\/\/www.skierpage.com\/blog\/wp-json\/wp\/v2\/posts\/1753","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skierpage.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skierpage.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skierpage.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skierpage.com\/blog\/wp-json\/wp\/v2\/comments?post=1753"}],"version-history":[{"count":4,"href":"https:\/\/www.skierpage.com\/blog\/wp-json\/wp\/v2\/posts\/1753\/revisions"}],"predecessor-version":[{"id":2415,"href":"https:\/\/www.skierpage.com\/blog\/wp-json\/wp\/v2\/posts\/1753\/revisions\/2415"}],"wp:attachment":[{"href":"https:\/\/www.skierpage.com\/blog\/wp-json\/wp\/v2\/media?parent=1753"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skierpage.com\/blog\/wp-json\/wp\/v2\/categories?post=1753"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skierpage.com\/blog\/wp-json\/wp\/v2\/tags?post=1753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}