# Scanning Media

## CIS and CCD

Scanners have one of two types of sensors, CIS (Contact Image Sensor) and CCD (Charge Coupled Device). Most lower-end scanners and all-in-one printers are CIS. CIS scanners have issues when it comes to dealing with non-flat materials (like bound booklets). They have a very narrow depth of field, meaning that the scanner can only focus within a couple millimeters from the scanbed surface and often produce blurry scans. CCD scanners are larger and more expensive but allow the surface of the media to vary in height with little impact on image quality, which also means less blurry scans.

## Halftone and Moire

Printed media usually uses a technique called "Halftone", which uses closely placed miniscule dots to make the illusion of color. Scanners capture the surface in such high detail that the dots become visible in the image. The overlaid patterns then produce the moire effect. This effect can be minimized using algorithms, better if the pattern stays consistent throughout the image, which is much easier to achieve with CCD scanners.

<figure style="margin: 0;">
	<img src="/assets/img/scanning/moire-no-yes.jpg">
	<figcaption>a digital image without moire and a scanned image with moire</figcaption>
</figure>

## Scanning

Making and actually keeping high quality scans of as many surfaces as possible is highly recommended as digital images can always be adapted or shrunk as needed but higher quality variants cannot be restored from thin air.

### 1. Prescan

Make sure to scan at 1200dpi and to a lossless format (preferrably PNG, or TIFF if the former is unavailable) to have the most data available for touchups and descreening. If the scanner does not support scanning at 1200dpi, scan at 600dpi, do not scan at under 600dpi.

Properly preparing the scanbed and media surfaces will save significant time on cleanups. Before starting wash your hands without applying hand cream to get rid of oils. Before each scan wipe the media surface with a cotton cloth and spray it with compressed air. After every couple of scans clean the scanbed with glass cleaner, wipe it with a cotton cloth and spray it with compressed air.

Few tips for higher quality scans:

* After closing the lid of the scanner weigh it down with something heavy with equal weight distribution (a full pack of paper, some books, etc) to get a more consistent scan.
* When scanning surfaces with creases, keep them perpendicular to the sensor of the scanner to make them stand out less.
* Do not lay media on the scanbed tilted, keep it as straight as possible to save time and reduce distortion when rotating in post.

### 2. Midscan

Crop scans to only include the media surface. In case of non-rectangular surfaces leave a comfortable amount (~5% on each side) of padding around the edges of the scan to not cut the media surface or its shadow with the edge of the image.

<figure style="margin: 0;">
	<img src="/assets/img/scanning/disc-bad-good.jpg">
	<figcaption>a bad disc crop and a good disc crop</figcaption>
</figure>

Apply touchups to get rid of hairs and dust specks, most commonly by using the healing brush. If you decide to apply color correction and/or descreening algorithms do so on a separate layer if possible, that way it does not interfere with touchups that might be required after.

!!! attention
	* Do not use fill or bucket tools as they will destroy the uniform texture of the scan and make the image look harsh and unnatural.
	* Be very careful with color correction and descreening algorithms.

1200dpi scans can be massive and are often even considered overkill. After finishing working on the image it can quite safely be downscaled to 600dpi (50% reduction in size) for storage.

!!! attention
	Apply any touchups and descreening algorithms before downscaling to 600dpi, otherwise the result will not be as good as there is less data for the tools to make educated decisions about.

For the best balance between compatibility, quality and size finalized scans should be saved in PNG format, which can then be further optimized with compression optimization tools like [oxipng](https://github.com/shssoichiro/oxipng). Depending on which PNG encoder the image was originally saved with the savings can range from 10% to 50%.

### 3. Postscan

Use proper naming for scans, otherwise people will have a hard time identifying the physical locations of scanned surfaces. <small>See&nbsp;[Naming&nbsp;Scans](/reference/naming-scans)</small>

<figure style="margin: 0;">
	<img src="/assets/img/scanning/scans.jpg">
	<figcaption>Scans with proper names</figcaption>
</figure>

Consider sharing your scans to [MusicBrainz / Cover Art Archive](https://musicbrainz.org/doc/How_to_Add_Cover_Art), the only commendable effort for scan preservation at the moment. As the content is hosted by the Internet Archive, which is a registered library in California, it is a much less desirable target for copyright sharks. Everything uploaded will be preserved and publicly accessible in original quality.

!!! danger
	* [VGMdb](https://vgmdb.net) requires an account to view scans and serves lossy images. In general, does not have an API and has poor data normalization.
	* [Discogs](https://discogs.com) serves lossy images downscaled to 600px, which are useless for even just reading the tracklist.



{{ pageinfo(authors=["Tuesday", "Salty"], created="2022/03/10", updated="2023/01/29") }}

[^1]: <https://slsklibrary.com/pages/coverart_scanning.html>
[^2]: <https://musicbrainz.org/doc/How_to_Add_Cover_Art>
