Image to C/C++ Array Converter

版本 1.0.1 (2.5 KB) 作者: Saipraveen
This program converts a BMP/TIFF/JPG/PNG file to a monochrome image & an embedded C/C++ byte array.
256.0 次下载
更新时间 2019/9/17

查看许可证

This program converts a BMP/TIFF/JPG/PNG file to an embedded C/C++ byte array. This is very helpful when you want to display a monochrome image on your display.
It converts your image monochrome before data array generation. The darker colors in the source image will produce 'on' pixels, while the lighter colors will be 'off' pixels.
The code provides an intermediate output of the created monochrome image for your validation. The code also resizes the input image based on the width & height entered before array generation.

Steps:
1) Enter the width & height of the output image
2) Choose the image for conversion
3) Verify if the monochrome output is satisfactory
4) Click on 'Yes, proceed' to continue with code generation
5) A new file named 'imagedata.cpp' is created in the present working directory with the byte array data.
6) A dialog box indicating the successful conversion with the image converted appears.

Based on the use case you can modify the fprintf statements to reflect your embedded controller or display.

引用格式

Saipraveen (2024). Image to C/C++ Array Converter (https://www.mathworks.com/matlabcentral/fileexchange/72535-image-to-c-c-array-converter), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2019a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Images 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.1

Thumbnail updated

1.0.0