Positron Media Foundry

Getting Started ›› Software ››
 visits
Parent Previous Next

Positron Media Foundry

Turn pictures and video into media your TFT display can use.


Positron Media Foundry prepares RGB565 images and movies for TFT & EPD Graphic Library 2 and the Positron BASIC compilers. Build a batch, choose the output size, check the conversion and write the files to an SD card. For small fixed images, export a Flash16 table to include directly in your program.

The application brings conversion, preview, card preparation and file checking into one workspace. Its output is for TFT displays; it does not generate the separate e-paper image format.


Positron Media Foundry batch window beside the generated code report


A completed media batch and its generated Positron code report.


Open the User Manual · Learn how Modern mode works

Built from the original media converter

Media Foundry continues the work of SdCardWriteRGB565.exe: preparing pictures and video that a PIC can draw without decoding the original desktop media format. The conversion is done on the PC, leaving the microcontroller to read and display the prepared data.


The old workflow could also involve a separate disk utility to work around raw-card write failures. Media Foundry brings card formatting and raw erasure into the application and handles volume locking and dismounting before writing. The earlier manual sector-editing workaround is no longer part of the normal setup.

It still uses ffmpeg.exe and ffprobe.exe for media conversion. ffplay.exe is used for previews opened from Verify Card. These media tools are separate from the disk-editing utilities the new workflow removes.

One batch, two places to store the result

Output

Use it for

What you receive

SD card

Pictures and movies streamed while your program runs.

RGB565 BMP images or raw RGB565 video, with a Legacy or Modern card index.

Program memory

Small fixed images, icons and splash screens.

A Positron BASIC Flash16 declaration containing the dimensions and pixel data.


Set each row's width and height, keep its proportions with Lock, and choose whether Crop trims the source to fit. A batch-wide rotation helps prepare assets for the panel's orientation. The background colour supplies the solid colour needed when a source image has transparent pixels.

Check the conversion before writing the card

Convert Only creates the output in the application's TEMP folder. TFT Preview then places a converted image or movie on a panel-sized canvas, using the library's bottom-left coordinate convention. Content extending beyond the panel is tinted red, making positioning mistakes easier to spot.

After writing, Verify Card reads the card itself. In Modern mode, double-clicking a live file downloads its recorded data, checks its CRC32 checksum and opens a preview.


Modern-mode Verify Card list with a frog image preview


Verify Card lists the recorded files and previews a selected image after checking it.


Modern mode keeps the file information with the media

A Modern card carries each file's alias, dimensions, length, checksum and other details in a fixed table. Your program can select an image or movie by its stored alias, while the application can show what is on the card without needing an old report file.

You can also free a file's slot and reuse its space. The next Convert & Append uses the first free slot large enough for the incoming file; when none fits, it adds a new slot at the end. A smaller replacement keeps the slot's original capacity for later reuse.


Verify Card showing the reused BeetleL slot and downloaded image preview


A small BeetleL image has reused a freed slot and can be checked from the card.


Modern Mode Explained walks through aliases, slot reuse, the header table and the differences from Legacy mode.

Prepare a card from the application

For a fresh card or a complete rebuild, the documented sequence is Format System (FAT32), then Format RAW, then Convert & Write in the chosen mode. Use Convert & Append for later additions in that same mode.

Card contents are replaced: formatting and a fresh write are destructive. Check the selected drive's letter, label and size before proceeding. A prepared RAW card has no normal Windows file system.

From a stored alias to the display

The following code is the supplied display demonstration. It draws several BMP images, plays the countdown movie and finishes with another image. Prepare a Modern-mode card containing these aliases first. SetCrystal() and SetPins() are the example project's setup routines; the snippet assumes the library and hardware configuration are already included.


Main:

    Clear

    SetCrystal()

    SetPins()


    TftSetUp(0,0)  

    TftResetScreen(WHITE)

    TftBmpFromSdRawAlias("BeetleL",136,96)

    DelayMS 2000

    TftBmpFromSdRawAlias("TestPattern1",0,0)

    DelayMS 2000

    TftBmpFromSdRawAlias("Frog",0,0)

    DelayMS 2000

    TftBmpFromSdRawAlias("Fox",0,0)

    DelayMS 2000

    TftBmpFromSdRawAlias("Bunny",0,0)

    DelayMS 2000

    TftRgbFromSdRawAlias("OldFilmCountdown",40,40,0)

    TftBmpFromSdRawAlias("Bird",0,0)

End



 



The positions are measured from the display's lower-left corner. The final 0 in the movie call selects no additional inter-frame delay; it does not request a particular frame rate.

Documentation

Created with the Personal Edition of HelpNDoc: Free EPub and documentation generator