GithubHelp home page GithubHelp logo

joexie / bmp-io Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nayuki/bmp-io

0.0 2.0 0.0 168 KB

BMP file reader and writer library in Java

Home Page: http://nayuki.eigenstate.org/page/bmp-io-library-java

bmp-io's Introduction

BMP I/O

Introduction

BMP I/O is a lightweight Java library for reading and writing Windows BMP files.

Supported reading formats:

  • Paletted 1-bit
  • Paletted 4-bit
  • Paletted 4-bit with RLE compression
  • Paletted 8-bit
  • Paletted 8-bit with RLE compression
  • RGB 8,8,8
  • RGBA 8,8,8,8

Bitmap files with image data in bottom-to-top order (common) and top-to-bottom order (unusual) are supported.

Supported writing formats:

  • RGB 8,8,8

Demo

In the demo directory, run the class SimpleDemo with the command java SimpleDemo. It will create a sample file Demo.bmp in the current directory.

Full listing of demos:

  • SimpleDemo: Draws a square for each of the 8 extreme colors, and four 2D gradient squares. This shows that the image is in true color (rather than paletted 256-color, etc.).
  • MandelbrotDemo: Draws a black-and-white image of the main part of the Mandelbrot set. The image is computed on the fly when each pixel is being requested for writing.
  • ReadDemo: Reads Demo.bmp (which can be in any color format) and writes Demo2.bmp with the same image contents but in RGB 8,8,8 true color.

License

Copyright © 2011 Nayuki Minase

(MIT License)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

  • The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

  • The Software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the Software or the use or other dealings in the Software.

bmp-io's People

Contributors

nayuki avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.