All Projects → LuizZak → FastBitmap

LuizZak / FastBitmap

Licence: MIT license
A fast C# Bitmap wrapping layer

Programming Languages

C#
18002 projects

Labels

Projects that are alternatives of or similar to FastBitmap

Graver
Graver 是一款高效的 UI 渲染框架,它以更低的资源消耗来构建十分流畅的 UI 界面。Graver 独创性的采用了基于绘制的视觉元素分解方式来构建界面,得益于此,该框架能让 UI 渲染过程变得更加简单、灵活。https://cocoapods.org/pods/Graver
Stars: ✭ 1,482 (+1623.26%)
Mutual labels:  bitmap
Ezfilter
A lightweight (<180KB), easy-to-extend Android filter and dynamic sticker framework for adding filters and stickers for camera, video, bitmap and view.(一个轻量级(<180KB)、易扩展的Android滤镜和动态贴纸框架,支持摄像头、视频、图片和视图添加滤镜和贴纸。)
Stars: ✭ 155 (+80.23%)
Mutual labels:  bitmap
powerpaint
Kreative PowerPaint - Library and Application for Bitmap and Vector Image Editing
Stars: ✭ 27 (-68.6%)
Mutual labels:  bitmap
Lora Serialization
LoraWAN serialization/deserialization library for The Things Network
Stars: ✭ 120 (+39.53%)
Mutual labels:  bitmap
Easyrs
Convenience RenderScript tools for processing common Android formats such as Bitmap and NV21.
Stars: ✭ 144 (+67.44%)
Mutual labels:  bitmap
Pilosa
Pilosa is an open source, distributed bitmap index that dramatically accelerates queries across multiple, massive data sets.
Stars: ✭ 2,224 (+2486.05%)
Mutual labels:  bitmap
Circularimageview
This project allowing you to create circular and rounded corner Imageview in android through simplest way.
Stars: ✭ 90 (+4.65%)
Mutual labels:  bitmap
AsciiMap
Creates ASCII Art from Bitmaps
Stars: ✭ 21 (-75.58%)
Mutual labels:  bitmap
Android Close Pixelate
Android port of https://github.com/desandro/close-pixelate
Stars: ✭ 146 (+69.77%)
Mutual labels:  bitmap
Cherry
another bitmap font
Stars: ✭ 244 (+183.72%)
Mutual labels:  bitmap
Bitmap
C++ Bitmap Library
Stars: ✭ 125 (+45.35%)
Mutual labels:  bitmap
Kluban
Lifecycle + Kotlin 协程 + flow + LiveData + Glide 识别和内存优化 + Luban采样算法 = KLuban图片压缩
Stars: ✭ 144 (+67.44%)
Mutual labels:  bitmap
Resourcelib
C# File Resource Management Library
Stars: ✭ 197 (+129.07%)
Mutual labels:  bitmap
Fastbitset.js
Speed-optimized BitSet implementation for modern browsers and JavaScript engines
Stars: ✭ 118 (+37.21%)
Mutual labels:  bitmap
CQULogo
重庆大学视觉标识素材包 --- Visual Identification Bundle of Chongqing University
Stars: ✭ 55 (-36.05%)
Mutual labels:  bitmap
Drawablecolorchange
Android Library to dynamically change color of drawable.
Stars: ✭ 101 (+17.44%)
Mutual labels:  bitmap
Signatureview
SignatureView is an open source Android library which allow developers to produce pen and paper like effect for creating signatures on Android
Stars: ✭ 185 (+115.12%)
Mutual labels:  bitmap
cocoa-close-pixelate
Cocoa port of https://github.com/desandro/close-pixelate
Stars: ✭ 47 (-45.35%)
Mutual labels:  bitmap
Doramon
个人工具汇总:一致性哈希工具,Bitmap工具,布隆过滤器参数生成器,Yaml和properties互转工具,一键式生成整个前后端工具,单机高性能幂等工具,zookeeper客户端工具,分布式全局id生成器,时间转换工具,Http封装工具
Stars: ✭ 53 (-38.37%)
Mutual labels:  bitmap
Steganography
Least Significant Bit Steganography for bitmap images (.bmp and .png), WAV sound files, and byte sequences. Simple LSB Steganalysis (LSB extraction) for bitmap images.
Stars: ✭ 229 (+166.28%)
Mutual labels:  bitmap

FastBitmap - The Fast C# Bitmap Layer

Based on work found on Visual C# Kicks: http://www.vcskicks.com/fast-image-processing.php

Build status codecov

FastBitmap is a bitmap wrapper class that intends to provide fast bitmap read/write operations on top of a safe layer of abstraction.

It provides operations for setting/getting pixel colors, copying regions accross bitmaps, clearing whole bitmaps, and copying whole bitmaps.

Editing pixels of a bitmap is just as easy as:

    Bitmap bitmap = new Bitmap(64, 64);
    
    using(var fastBitmap = bitmap.FastLock())
    {
        // Do your changes here...
        fastBitmap.Clear(Color.White);
        fastBitmap.SetPixel(1, 1, Color.Red);
    }

Or alternatively, albeit longer:

    Bitmap bitmap = new Bitmap(64, 64);
    FastBitmap fastBitmap = new FastBitmap(bitmap);
    
    // Locking bitmap before doing operations
    fastBitmap.Lock();
    
    // Do your changes here...
    fastBitmap.Clear(Color.White);
    fastBitmap.SetPixel(1, 1, Color.Red);
    
    // Don't forget to unlock!
    fastBitmap.Unlock();

This project contains the FastBitmap class and acompanying unit test suite.
Note that to compile this class you must have the /unsafe compiler flag turned on in your project settings.

Note: This code currently only works with 32bpp bitmaps

Installation

FastBitmap is available as a Nuget package:

PM > Install-Package FastBitmapLib

Speed

The following profiling tests showcase comparisions with the native System.Drawing.Bitmap equivalent method calls

SetPixel profiling
1024 x 1024 Bitmap SetPixel: 2054ms
1024 x 1024 FastBitmap SetPixel: 398ms
1024 x 1024 FastBitmap Int SetPixel: 331ms

Results: FastBitmap 6,21x faster

GetPixel profiling
1024 x 1024 Bitmap GetPixel: 1498ms
1024 x 1024 FastBitmap GetPixel: 382ms
1024 x 1024 FastBitmap Int GetPixel: 327ms

Results: FastBitmap 4,58x faster

Bitmap copying profiling
1024 x 1024 Bitmap SetPixel: 2888ms
1024 x 1024 FastBitmap CopyPixels: 5ms

Results: FastBitmap 577,60x faster

Bitmap clearing profiling
1024 x 1024 Bitmap SetPixel: 1795ms
1024 x 1024 FastBitmap Clear: 5ms

Results: FastBitmap 359,00x faster

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].