UTFTConverter: Processing popular picture formats into .c or .raw format in RGB565
This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.
Warnings:
- 'ghc-options: -O2' is rarely needed. Check that it is giving a real benefit and not just imposing longer compile times on your users.
- Exposed modules use unallocated top-level names: Format
About:
This package was created because I could not find a tool that can be used on UNIX systems to
parse a picture into an array of RGB565
values and save them to a '.c' or '.raw' file. Both formats
are used by the UTFT library to display pictures on to a TFT display.
This package includes, but not limited to, an executable which is made to be as identical as possible to the corresponding tool that is also downloaded with the UTFT library.
Usage:
./UTFTConverter <filespec> /c|r [/o <path>] [/t AVR|ARM|PIC32] <filespec>: File(s) to convert parameters: /c - Create output as .c array files /r - Create output as .raw files /o <path> - Set the output directory to <path> /t <platform> - Select target plaform AVR : Most Arduinos, Bobuion ARM : Arduino Due, Teensy, TI CC3200 LaunchPad PIC32 : All chipKit boards You must specify either /c or /r. All other parameters are optional. If /o is ommited the current directory will be used for output. If /t is ommited the target platform will be set to AVR.'
Supported formats:
The binary tests if the pictures are encoded correctly via magic bytes using ImageType. If the extention is wrong, but the encoding is correct, it will still try to convert the picture.
The exported library is using JuicyPixels to convert incoming
'.gif'
'.png'
'.jpg' / '.jpe' / '.jpeg'
'.bmp'
'.tga'
and translates every pixel to a RGB565
format, which is a 4 digit hex number.
Library:
The only really reusable library is the Format.RGB565
.
It support the conversion from
RGB
toRGB565
as (Word8
,Word8
,Word8
) ->Int
Int
toHex
asInt
->String
Example usage:
>>> toRGB565 (0, 0, 255) 31
>>> toRGB565Hex (0, 0, 255) "001F"
>>> toHex 100 64
>>> toNHex 6 100 "0064"
[Skip to Readme]
Properties
Versions | 0.1.0.0, 0.1.0.1, 0.1.0.1 |
---|---|
Change log | None available |
Dependencies | base (>=4.7 && <4.9), bytestring (>=0.10 && <0.11), directory (>=1.2 && <1.3), filepath (>=1.3 && <1.5), image-type (>=0.1.0.0), JuicyPixels (>=3.2 && <3.3), time (>=1.4 && <1.6), UTFTConverter (>=0.1 && <0.2) [details] |
License | MIT |
Author | Alexander Isenko |
Maintainer | Alexander Isenko <alex.isenko@protonmail.com> |
Category | Graphics, Text |
Home page | http://github.com/cirquit/UTFTConverter |
Bug tracker | http://github.com/cirquit/UTFTConverter/issues |
Source repo | head: git clone git://github.com/cirquit/UTFTConverter.git |
Uploaded | by cirquit at 2016-05-04T22:35:20Z |
Modules
[Index]
Downloads
- UTFTConverter-0.1.0.1.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
Package maintainers
For package maintainers and hackage trustees