free-game-1.1.80: Create games for free

Copyright(C) 2013 Fumiaki Kinoshita
LicenseBSD-style (see the file LICENSE)
MaintainerFumiaki Kinoshita <fumiexcel@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

FreeGame.Data.Bitmap

Contents

Description

Manipulating bitmaps

Synopsis

Basic types and functions

data Bitmap Source

Constructors

Bitmap 

bitmapSize :: Bitmap -> (Int, Int) Source

Get the size of the Bitmap.

Load and Save

readBitmap :: MonadIO m => FilePath -> m Bitmap Source

Load an image file.

writeBitmap :: MonadIO m => FilePath -> Bitmap -> m () Source

Save Bitmap into a file.

Bitmap operations

cropBitmap Source

Arguments

:: Bitmap

original bitmap

-> (Int, Int)

width and height

-> (Int, Int)

x and y

-> Bitmap

result

Extract a Bitmap from the specified range.

V2