free-game-1.0.3: Create games for free

Portabilitynon-portable
Stabilityexperimental
MaintainerFumiaki Kinoshita <fumiexcel@gmail.com>
Safe HaskellNone

FreeGame.Data.Bitmap

Contents

Description

Manipulating bitmaps

Synopsis

Basic types and functions

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

Get the size of the Bitmap.

Load and Save

readBitmap :: MonadIO m => FilePath -> m BitmapSource

Load an image file.

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

Save Bitmap into a file.

loadBitmapFromFile :: MonadIO m => FilePath -> m BitmapSource

Deprecated: use readBitmap instead

Bitmap operations

cropBitmapSource

Arguments

:: Bitmap

original bitmap

-> (Int, Int)

width and height

-> (Int, Int)

x and y

-> Bitmap

result

Extract a Bitmap from the specified range.