diff --git a/README.md b/README.md index ea11e89..924aff2 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Options: Library ------- -Documentation available at hackage +[Documentation available at hackage](https://hackage.haskell.org/package/picedit-0.1.0.0/docs/Data-Picture.html) ```haskell import Picture diff --git a/app/Main.hs b/app/Main.hs index 744af14..4b72768 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -1,5 +1,5 @@ module Main where - import Picture + import Data.Picture import System.Environment data Options = Options { file :: FilePath @@ -27,7 +27,6 @@ module Main where main :: IO () main = do args <- getArgs - print args if null args then do diff --git a/picedit.cabal b/picedit.cabal index 382a09b..5e545d2 100644 --- a/picedit.cabal +++ b/picedit.cabal @@ -2,12 +2,12 @@ name: picedit version: 0.1.0.0 synopsis: simple image manipulation functions description: Simple set of functions for image manipulation: contrast, brightnesss, rotation, etc. -homepage: https://github.com/mdibaiee/image-editor-hs#readme +homepage: https://github.com/mdibaiee/picedit#readme license: GPL-3 license-file: LICENSE -author: Author name here -maintainer: example@example.com -copyright: 2016 Author name here +author: Mahdi Dibaiee +maintainer: mdibaiee@aol.com +copyright: 2016 Mahdi Dibaiee category: Image, Picture, Matrix build-type: Simple -- extra-source-files: @@ -15,14 +15,14 @@ cabal-version: >=1.10 library hs-source-dirs: src - exposed-modules: Picture + exposed-modules: Data.Picture build-depends: base >= 4.7 && < 5, JuicyPixels >= 3.2.8 && < 3.3, hmatrix >= 0.17.0.2 && < 0.18, vector >= 0.11.0.0 && < 0.12 default-language: Haskell2010 -executable image-editor-hs-exe +executable picedit hs-source-dirs: app main-is: Main.hs ghc-options: -threaded -rtsopts -with-rtsopts=-N diff --git a/src/Picture.hs b/src/Data/Picture.hs similarity index 88% rename from src/Picture.hs rename to src/Data/Picture.hs index eb4513d..629b4a5 100644 --- a/src/Picture.hs +++ b/src/Data/Picture.hs @@ -2,18 +2,27 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} -module Picture ( grayscale - , readPicture - , fromImage - , toImage - , writePicturePng - , fade - , rotate - , contrast - , brightness - , gamma - , invert - ) +{-| +Module : Picture +Description : manipulation functions +Copyright : (c) Mahdi Dibaiee, 2016 +License : GPL-3 +Maintainer : mdibaiee@aol.com +Stability : experimental +Portability : POSIX +-} +module Data.Picture ( grayscale + , readPicture + , fromImage + , toImage + , writePicturePng + , fade + , rotate + , contrast + , brightness + , gamma + , invert + ) where import Codec.Picture @@ -21,10 +30,7 @@ module Picture ( grayscale import qualified Data.Vector.Storable as V import System.IO import Data.Maybe - import Debug.Trace - -- RGBA - -- | 'Picture' type is just a triple of color channel matrices: (R, G, B) type Picture = (Matrix Double, Matrix Double, Matrix Double)