| Copyright | (c) Laurent P René de Cotret 2019 - present |
|---|---|
| License | BSD3 |
| Maintainer | laurent.decotret@outlook.com |
| Stability | unstable |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Hakyll.Images.Internal
Description
Internal re-exports used for tests.
Synopsis
- data Image = Image {
- format :: !ImageFormat
- image :: !ByteString
- withImageContent :: (ImageContent -> ImageContent) -> (ImageFormat -> ImageContent -> Image) -> Image -> Image
- type ImageContent = WithMetadata DynamicImage
- decodeContent :: ByteString -> WithMetadata DynamicImage
- data WithMetadata a = MkWithMetadata {
- getData :: !a
- getMetadata :: !Metadatas
- data ImageFormat
- loadImage :: Compiler (Item Image)
- encode :: ImageFormat -> ImageContent -> Image
Documentation
Constructors
| Image | |
Fields
| |
Arguments
| :: (ImageContent -> ImageContent) | |
| -> (ImageFormat -> ImageContent -> Image) | Encoder function |
| -> Image -> Image |
Map over the content of an Image, decoded into an ImageContent.
type ImageContent = WithMetadata DynamicImage Source #
data WithMetadata a Source #
Constructors
| MkWithMetadata | |
Fields
| |
Instances
| Functor WithMetadata Source # | |
Defined in Hakyll.Images.Common Methods fmap :: (a -> b) -> WithMetadata a -> WithMetadata b # (<$) :: a -> WithMetadata b -> WithMetadata a # | |
data ImageFormat Source #
Instances
| Generic ImageFormat Source # | |
Defined in Hakyll.Images.Common Associated Types type Rep ImageFormat :: Type -> Type # | |
| Binary ImageFormat Source # | |
Defined in Hakyll.Images.Common | |
| Eq ImageFormat Source # | |
Defined in Hakyll.Images.Common | |
| type Rep ImageFormat Source # | |
Defined in Hakyll.Images.Common type Rep ImageFormat = D1 ('MetaData "ImageFormat" "Hakyll.Images.Common" "hakyll-images-1.3.0-ywFCEwTDinB3VWGXKE1K7" 'False) ((C1 ('MetaCons "Jpeg" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Png" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Bitmap" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Tiff" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Gif" 'PrefixI 'False) (U1 :: Type -> Type)))) | |
loadImage :: Compiler (Item Image) Source #
Load an image from a file. This function can be combined with other compilers.
match "*.jpg" $ do route idRoute compile $ loadImage >>= compressJpgCompiler 50
encode :: ImageFormat -> ImageContent -> Image Source #