qr-imager 0.2.1.1 → 0.2.1.2
raw patch · 2 files changed
+61/−54 lines, 2 filesdep ~JuicyPixelsdep ~MissingHdep ~aeson
Dependency ranges changed: JuicyPixels, MissingH, aeson, base, bytestring, cryptonite, directory, haskell-qrencode, jose-jwt, lens, optparse-applicative, process, qr-imager, vector
Files
- qr-imager.cabal +60/−53
- src/Data/QRCodes/Image.hs +1/−1
qr-imager.cabal view
@@ -1,59 +1,66 @@-name: qr-imager-version: 0.2.1.1-synopsis: Library to generate QR codes from bytestrings and objects-description: Please see README.md-homepage: https://github.com/vmchale/QRImager#readme-license: BSD3-license-file: LICENSE-author: Vanessa McHale-maintainer: tmchale@wisc.edu-copyright: Copyright: (c) 2016 Vanessa McHale-category: Data-build-type: Simple-stability: stable-extra-source-files: README.md-cabal-version: >=1.10+name: qr-imager+version: 0.2.1.2+cabal-version: >=1.10+build-type: Simple+license: BSD3+license-file: LICENSE+copyright: Copyright: (c) 2016 Vanessa McHale+maintainer: tmchale@wisc.edu+stability: stable+homepage: https://github.com/vmchale/QRImager#readme+synopsis: Library to generate QR codes from bytestrings and objects+description:+ Please see README.md+category: Data+author: Vanessa McHale+extra-source-files:+ README.md +source-repository head+ type: git+ location: https://github.com/vmchale/QRImager+ library- hs-source-dirs: src- exposed-modules: Data.QRCodes- , Data.QRCodes.Exe- , Data.QRCodes.Image- , Data.QRCodes.Signature- other-modules: Data.QRCodes.Utils- build-depends: base >= 4.7 && < 5- , aeson- , JuicyPixels- , vector- , bytestring- , lens- , cryptonite- , jose-jwt- , directory- , haskell-qrencode- , process- , MissingH- , optparse-applicative- default-language: Haskell2010+ exposed-modules:+ Data.QRCodes+ Data.QRCodes.Exe+ Data.QRCodes.Image+ Data.QRCodes.Signature+ build-depends:+ base >=4.7 && <5,+ aeson >=0.11.2.1 && <0.12,+ JuicyPixels >=3.2.8 && <3.3,+ vector >=0.11.0.0 && <0.12,+ bytestring >=0.10.8.1 && <0.11,+ lens ==4.14.*,+ cryptonite ==0.19.*,+ jose-jwt >=0.7.3 && <0.8,+ directory >=1.2.6.2 && <1.3,+ haskell-qrencode >=1.0.4 && <1.1,+ process >=1.4.2.0 && <1.5,+ MissingH >=1.4.0.1 && <1.5,+ optparse-applicative >=0.12.1.0 && <0.13+ default-language: Haskell2010+ hs-source-dirs: src+ other-modules:+ Data.QRCodes.Utils executable qrpipe- hs-source-dirs: app- main-is: Main.hs- ghc-options: -threaded -rtsopts -with-rtsopts=-N- build-depends: base- , qr-imager- default-language: Haskell2010+ main-is: Main.hs+ build-depends:+ base >=4.9.0.0 && <4.10,+ qr-imager >=0.2.1.2 && <0.3+ default-language: Haskell2010+ hs-source-dirs: app+ ghc-options: -threaded -rtsopts -with-rtsopts=-N test-suite test-lib- type: exitcode-stdio-1.0- hs-source-dirs: test- main-is: Spec.hs- ghc-options: -threaded -rtsopts -with-rtsopts=-N- build-depends: base- , qr-imager- , process- default-language: Haskell2010--source-repository head- type: git- location: https://github.com/vmchale/QRImager+ type: exitcode-stdio-1.0+ main-is: Spec.hs+ build-depends:+ base >=4.9.0.0 && <4.10,+ qr-imager >=0.2.1.2 && <0.3,+ process >=1.4.2.0 && <1.5+ default-language: Haskell2010+ hs-source-dirs: test+ ghc-options: -threaded -rtsopts -with-rtsopts=-N
src/Data/QRCodes/Image.hs view
@@ -47,7 +47,7 @@ bsToImg :: BS.ByteString -> IO (T.Image Word8) bsToImg input = do smallMatrix <- toMatrix <$> encodeByteString input Nothing QR_ECLEVEL_H QR_MODE_EIGHT False- let qrMatrix = fattenList 8 $ map (fattenList 8) smallMatrix+ let qrMatrix = fattenList 8 $ map (fattenList 8) smallMatrix --consider using repa here, with the `onImg` thing with JuicyPixels pure $ encodePng qrMatrix -- | Encode an object as a JuicyPixels `Image`