From Swordfish Wiki

SwordfishUser: MonochromeImageConverter

Introduction

This is a standalone application to convert bitmap, tiff, png or gif images to byte arrays for use with the SetImage command of most monochrome GLCD libraries. It will open files upto 320 x 240 pixels in size, but due to the constraints of the byte array, the selected part of the image should be limited to 255 x 255 pixels maximum.

For best results the image should first be prepared using a dedicated image editing package such as PaintShopPro or PhotoShop. Using these packages it should be possible to convert most images to a suitable size. In addition, images should be converted to 1-bit-per-pixel for best results.

Where the above is not easily possible, colour or grey-scale images can be opened by the Monochrome Image Converter and there is the option to dither the final image. The brightness may also be adjusted to give acceptable results.

There is the option to change the foreground and background colour of the image to best match the colours of the display being used. This will allow you to best visualise the final look of a converted image. It is possible also to invert the image after it has been opened.

Paintbrush and eraser tools are provided for touching up the image if necessary. Once the image is ready, the selection tool should be used to select the required area. By splitting a large image down into a number of smaller images, it would be possible to save a series of icons for example that could be used individually.

Before viewing and copying the generated byte array, it is important to either select Y-direction or X-direction bytes. For most GLCD libraries written at present, Y-direction bytes should be used. The only exception currently is the 320 x 240 pixel display using the S1D13700 driver, for which X-direction bytes should be used.

There is the option to either view the generated byte array, or simply copy the code to the clipboard. It should then be pasted into the Swordfish IDE, either into its own library file or into the program directly.

Finally, there is the option to create a new blank image directly in the application. However, there is currently no option to save this image, so it would probably be best to only use this option to create simple icons with the paintbrush and eraser tools.

Download

Download the Monochrome Image Converter - version 1.0.0.5

Note: the installation package will first check for installed components of the Microsoft DotNet Framework - this may take some time. The installation is also not digitally signed, so expect to see a window asking if you trust the application.

Retrieved from https://www.sfcompiler.co.uk/wiki/pmwiki.php?n=SwordfishUser.MonochromeImageConverter
Page last modified on October 11, 2008, at 11:13 AM