All Projects → edimetia3d → simpleBMP

edimetia3d / simpleBMP

Licence: other
A bare metal C++ header only library, support 8bit&24bit bmp read&write

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to simpleBMP

ascii-art
Given a image.bmp and a M x N group of pixels, generate a text that represents the image.bmp in ascii characters
Stars: ✭ 16 (-23.81%)
Mutual labels:  bmp
bgpkit-parser
MRT/BGP data parser written in Rust.
Stars: ✭ 43 (+104.76%)
Mutual labels:  bmp
sail
The missing small and fast image decoding library for humans (not for machines) ⛵ https://sail.software
Stars: ✭ 206 (+880.95%)
Mutual labels:  bmp
ICNS2ICO
ICNS2ICO lets you easily convert icons from the Apple's ICNS format to the Windows ICO format.
Stars: ✭ 17 (-19.05%)
Mutual labels:  bmp
StbSharp
C# port of the famous C framework
Stars: ✭ 62 (+195.24%)
Mutual labels:  bmp
gfxprim
Open-source modular 2D bitmap graphics library with emphasis on speed and correctness.
Stars: ✭ 32 (+52.38%)
Mutual labels:  bmp
StegX
Steganography (BMP, PNG, WAV, MP3, AVI, FLV)
Stars: ✭ 22 (+4.76%)
Mutual labels:  bmp
Imageprocessor
📷 A fluent wrapper around System.Drawing for the processing of image files.
Stars: ✭ 2,452 (+11576.19%)
Mutual labels:  bmp
Imagesharp
📷 A modern, cross-platform, 2D Graphics library for .NET
Stars: ✭ 5,186 (+24595.24%)
Mutual labels:  bmp
zigimg
Zig library for reading and writing different image formats
Stars: ✭ 112 (+433.33%)
Mutual labels:  bmp
QuickImageFX
Simplifying image manipulation using GDI, Graphics32, OpenCV or Vampyre Imaging libraries
Stars: ✭ 41 (+95.24%)
Mutual labels:  bmp
NeoGB-Printer
An open-source and standalone Gameboy Printer emulator 100% compatible with all officially released games (110 in total) that support the accessory. Just print and save the images as BMP
Stars: ✭ 61 (+190.48%)
Mutual labels:  bmp
VNet
Prostate MR Image Segmentation 2012
Stars: ✭ 54 (+157.14%)
Mutual labels:  bmp
stbi-sharp
C# wrapper around stb_image.h and qoi.h
Stars: ✭ 17 (-19.05%)
Mutual labels:  bmp

simpleBMP

A bare metal C++ header only library, support 8bit & 24bit BMP image reading/writing.

Features

  • Open && Save BMP file (Only 8bit and 32bit)
  • There is no so much abstraction, this library just read every bytes of BMP file into a structure.
    • You can reach every byte in bmp-file by using defined name.
    • You need to know the meaning of the defined names, the docstring in header may help you.
    • If you want to do more, read the specification of BMP from the link in the header file, and do as you want.
  • Source code is very short and well doc-ed, read the code is more easier than readme.

Installation:

#include "simpleBMP.h"

Usage:

simpleBMP::BMPImg  img; // create a image
img.LoadImage("/path/to/img.bmp"); // load file
uint8_t * a = img.At(0,0) // Get pixel addr by index
uint8_t * a = img.AtLine(0) // Get pixel addr by line number
std::vector<uint8_t> c0 = img.GetChannel(0) // Get entire channel data by channel number
img.SaveImage("/path/to/img2.bmp"); // save to disk

See Otsu method sample for more

Details:

  • Every BMPImg instance consisted of four data member, as same as bmp-file
    • file_header: contains the basic info of bmp-file
    • info_header: contains the data info of bmp-file
    • color_palette[256]: only when info_header.biBitCount <= 8, will load or save this part
    • pixel_data: contains the pixel data of bmp-file
  • Note
    • When using LoadImage(), info_header.biWidth and info_header.biHeight decide how much pixel to load
    • When using SaveImage(), you need to make sure file_header and info_header are both correct, you may build the debug version to let the assert help you checking.

Silly word:

It is really interesting that such a toy library get so "many" stars. It is good to see that it helps you, hope you enjoy it.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].