JPEGDecoder-master.gz

  • John Smith Gagarin
    了解作者
  • C/C++
    开发工具
  • 374KB
    文件大小
  • gz
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 0
    下载次数
  • 2021-03-25 17:57
    上传日期
This Arduino library supports the rendering of Jpeg files stored both on SD card and in arrays within program memory (FLASH) onto a TFT display
JPEGDecoder-master.gz
内容介绍
Arduino JPEGDecoder library =========== News: October 2019 - *I have created a new Arduino compatible [Jpeg decoder library here.](https://github.com/Bodmer/TJpg_Decoder) This new library is based on TinyJpegDec, this is 60% faster on 32bit processors, it also has a much simpler interface.* This Arduino library supports the rendering of Jpeg files stored both on SD card and in arrays within program memory (FLASH) onto a TFT display. In addition images stored in the SPIFFS (or LittleFS) Flash filing system or "PROGMEM" arrays can be used with the ESP8266 and ESP32 processors. For the ESP8266 use board Core 2.3.0 (or later) in the Arduino IDE to avoid File definition conflicts if the SPIFFS and SD libraries are used together. The library works on the Arduino Due, ESP32 and ESP8266 (e.g. NodeMCU 1.0). Users have also reported success with the STM32 based processor boards. Example images can be found in the "extras" folder. Jpeg files in the "Progressive" format (where image data is compressed in multiple passes with progressively higher detail) are not supported since this would require much more memory, or too many Inverse Discrete Cosine Transform's for typical embedded systems. High Jpeg compression ratios work best on images with smooth colour changes, however the Baboon40.jpg image at only 23.8 KBytes renders quite nicely. Typically a 480x320 image can be compressed without much degradation to less than 32 KBytes, in comparison a 24 bit BMP image would occupy 461 KBytes! For comaprison the 480 x 320 Mouse480 image has been to compressed to a mere 6.45 Kbytes! When storing the jpeg in a memory array bear in mind the Arduino AVR processors (e.g. Mega2560 and Xmega) have a maximum 32767 byte limit for the maximum size of an array (32 KBytes minus 1 byte). The decompression of Jpeg images needs more RAM than an UNO provides, thus this library is targetted at processors with more RAM. The library has been tested with Arduino Due and ESP8266/ESP32 based boards. The decompression of Jpegs involves a lot of maths, so it takes a Due about ~1.3s to render a fullscreen (480x320 pixel) image and the Mega will take ~5s to do the same. The time for smaller images will reduce roughly pro-rata with the total pixel count. An ESP8266 running at 160MHz and 40MHz SPI coupled to a 320x240 ILI9341 display can render a Jpeg in as little as 240ms. This library supports either the SD library (and SdFat for Due). The SdFat allows a bit-bashed SPI interface to an SD Card which can be convenient for example on pins 50, 51 and 52 of a Due (on Mega these are hardware SPI). The library has been tested with the 1.8.1 version of the Arduino IDE and may generate error messages at compile time on other versions because "#ifdef \_\_AVR\_\_" is used to distinguish between the Mega and Due and select the correct libraries. The library has been tested with 3.2" and 3.0" displays based on the HX8357B, HX8357C and ILI9481 driver chips with a 16 bit parallel interface. Adapting the example sketch for other TFT drivers and their graphics libraries should be quite easy if they support either setWindow() or SetAddrWindow() and pushColor() functions as found in the Adafruit_GFX library. The Arduino Mega is not recommended as it does not reliably decode some jpeg images possibly due to a shortage of RAM. The Due will work fine with much bigger image sets in FLASH. The ESP8266 and ESP32 has been tested with an ILI9341 library using the SPI interface, with Jpeg images stored in SPIFFS and in Flash arrays. SD and SPIFFS filenames can be in String or character array format. File handles can also be used. This library has been based on the excellent picojpeg code and the Arduino library port by Makoto Kurauchi here: https://github.com/MakotoKurauchi/JPEGDecoder Makoto's original Readme below: ============================== JPEG Decoder for Arduino 概要 ---- Arduino 用 JPEG デコーダです。デコーダ部には [picojpeg](https://code.google.com/p/picojpeg/) を使用しています。 サンプルコード ---- ###SerialCsvOut SD カード上の JPEG ファイルをブロックごとにデコードし、シリアルから CSV を出力します。 変更履歴 ---- V0.01 - 最初のリリース
评论
    相关推荐
    • matlab实现JPEG编码实践
      学生短学期课程实践报告,JPEG编码流程
    • jpeg压缩源码
      这里有三个有关jpeg压缩的源代码。 1采用VC代码实现JPEG图像压缩,DCT变换,霍夫曼编码 2JPEG图象编解码代码,代码没有注释,西北大学(美国那个西北大学)放在网上供下载的,没有别的乱七八糟的东西
    • jpeg2000
      包括JPEG2000 Part 1的一个完整的C++实现,还有Kakadu_V2.2.3,挺好的。
    • JPEG图像压缩算法
      有关JPEG和DPCM算法的文章;2.实现其算法的压缩程序3.有关图像压缩方面的资料。读者请注意: 这里讨论的是灰度图像的压缩不涉及彩色图像。 实现压缩时,输入的图像数据采用一种自定义的格式(com 格式),前四个字节...
    • jpeg_toolbox
      This toolbox contains Matlab routines for manipulating JPEG files. While Matlab's built-in IMREAD and IMWRITE functions provide basic conversion between JPEG files and image arrays, they do not ...
    • JPEG_Encoder
      JPEG_编码器 Gnarly Gray JPEG编码器是针对Lattice Ultraplus FPGA和UPDuino v1.0和v2.0板卡的简约,低资源的JPEG编码器。 JPEG编码器用于减小图像尺寸,以便将图像更快地发送到AI项目的云服务器。 JPEG编码器已...
    • Actual JPEG
      这个程序很实用,我在用matlab进行JPEG图像处理时,对我的帮助很大。故跟大家分享
    • JPEG图像编码标准-PPT.rar
      本节主要介绍JPEG图像压缩编码算法(DCT变换算法)、图像数据文件格式 (JFIF,JPEG File Interchange Format)。 最后,对JPEG 2000进行一个简单的介绍
    • lab2_jpeg.rar
      example code on JPEG compression
    • lzw_soft.zip
      lzw压缩解压算法源码