|
Post by NeX on Oct 3, 2015 5:16:19 GMT -8
Hi there,
When i display a JPG from the SD card, it seems to be at a higher quality than a JPG that has been converted as an asset. is there any way to force assets to use the same bit depth as a JPG read from the SD card?
thanks
|
|
|
Post by jamesbowman on Oct 4, 2015 7:23:09 GMT -8
Yes, gdasset encodes images as ARGB4 format by default:
$ gd2asset --help usage: gd2asset <options> <assets>
-o output header file -f output asset file (default is header file)
If no output header file is given, then "default_assets.h" is used
Each asset is a filename, optionally followed by some var=val assignments. For example: pic1.png image, format ARGB4 pic2.jpg,format=L8 image, format L8 serif.ttf,size=16 font, 16 pixels high
The assets are compiled into flash, or if the "-f" option is given into a file. In this case the file should be copied to the microSD card. In either case, calling LOAD_ASSETS() from the program loads all assets. So to encode with format RGB565 (which is what the FT800 JPEG loader uses), do:
gd2asset ... pic2.jpg,format=RGB565
|
|
|
Post by NeX on Oct 5, 2015 8:47:23 GMT -8
Thanks very much for the help, this has actually helped me save space as well as get the Jpg quality i was after! thanks loads
|
|