File previews

The kinds of file that show a picture, and the picture cache

The file selector shows a picture for each file and a live preview for the selected one. This page lists every kind of file that shows a picture, the steps that a picture goes through, and where the pictures are kept.

Kinds of file

The selector finds the kind of a file by its name first. When the name tells nothing, or tells only that the file is text or plain bytes, it reads the start of the file. So a picture saved as .txt shows as a picture.

Kind Files Picture Live preview
Image Every image format that the program reads, such as PNG and JPEG The small picture in a JPEG photo (EXIF); else the image, scaled The image viewer, to zoom
Text Text, source code, JSON, XML, YAML The first lines, drawn on a page The text viewer, first 256 KiB
PDF .pdf The first page The PDF viewer, with its page bar
Font .ttf, .otf Aa in the font A line of text in the font, with its family
Archive zip, tar, tar.gz, tar.xz The icon The list of members; nothing is unpacked
Audio, video Every audio and video file A frame of a video The media player
Construct scene .construct The stored picture; else a render A 3D view
Construct pack .cpack The stored picture; else a render A 3D view
Mesh .stl, .obj, .ply, .vtk and the other formats that the importers read A drawing of the triangles A 3D view
Any other file Every file of no kind above The icon The bytes, in hexadecimal

Audio and video show their picture and their player in Agent, Remote and HUB. Construct scenes, packs and meshes show theirs in Construct and Construct Viewer. In the other programs, those files get no picture and no player of their own.

The 3D view of a scene, a pack or a mesh turns with the middle mouse button, and the wheel moves it closer or further away. The render of a scene needs a GPU. Without one, a scene shows its stored picture, or its icon when it has none. The picture of a mesh is drawn by the processor, so it needs no GPU.

Facts

Under the live preview, the preview lane shows the name, the type, the size and the date of the file. Then it shows the facts of its kind:

Kind Facts
Image The size in pixels, the format, and the frame count of an image with more than one frame
Text The line count
PDF The page count and the title, or that a password protects it
Font The family and the style
Archive The member count and the size unpacked
Audio, video The duration, and the size in pixels of a video
Construct scene The format version and the name of the scene
Construct pack The file count and the size unpacked
Mesh The triangle or element count, the vertex count and the part count

When a file cannot be read, the facts say so.

The steps of a picture

A picture gets better in steps. Each step replaces the one before it when it is at least as large.

Step Where the picture comes from Cost
Icon The icon of the type None: it shows at once
Stored picture The picture that the file holds: the preview of a Construct scene or pack, the EXIF picture of a photo A read of a small part of the file
Cached picture The picture cache, from an earlier render A read of a small PNG file
Rendered picture A picture made from the content of the file, at the size of the tile The cost of the kind of file

A file gets a rendered picture only when neither the stored picture nor the cached picture is as large as the tile, or when the file changed after the cached picture was made. The rendered picture then goes into the cache. Only the files on the screen get pictures, and a file that scrolls away stops its work.

The Hive file manager of Agent, Remote and HUB shows a file through the same kinds as the file selector, so a file looks the same in both.

The picture cache

The selector keeps the pictures that it renders in the pictures folder of the program's cache folder. Where your data lives gives the cache folder of each platform.

A cached picture belongs to one file at one time: its path, its size, its date, the kind that made it, and the size of the picture (64, 128, 256 or 512 px). A file that changes gets a new picture.

The cache cleans itself each time the program starts:

  • It deletes each picture that nobody read for 30 days.
  • It keeps the folder under 512 MiB.

To clear the cache yourself, close the program and delete its pictures folder. The program makes the folder again, and renders each picture again the next time it shows.

The selector does not read or write the shared picture cache of the desktop, so the pictures of the system's file manager stay as they are.

See also

In this section
Topics
reference files file selector preview thumbnails cache
See also