hip 1.0.1.2 → 1.1.0.0
raw patch · 38 files changed
+2048/−1812 lines, 38 filesdep +Chart-diagramsdep +QuickCheckdep +directorydep −Chart-cairodep ~basedep ~vectorPVP ok
version bump matches the API change (PVP)
Dependencies added: Chart-diagrams, QuickCheck, directory, hip, hspec
Dependencies removed: Chart-cairo
Dependency ranges changed: base, vector
API changes (from Hackage documentation)
- Graphics.Image.IO: setDisplayProgram :: (String, Bool) -> IO ()
- Graphics.Image.IO.External: BMP :: BMP
- Graphics.Image.IO.External: GIF :: GIF
- Graphics.Image.IO.External: HDR :: HDR
- Graphics.Image.IO.External: JPG :: JPG
- Graphics.Image.IO.External: LoopingForever :: GifLooping
- Graphics.Image.IO.External: LoopingNever :: GifLooping
- Graphics.Image.IO.External: LoopingRepeat :: Word16 -> GifLooping
- Graphics.Image.IO.External: MedianMeanCut :: PaletteCreationMethod
- Graphics.Image.IO.External: PBM :: PBM
- Graphics.Image.IO.External: PGM :: PGM
- Graphics.Image.IO.External: PNG :: PNG
- Graphics.Image.IO.External: PPM :: PPM
- Graphics.Image.IO.External: PaletteOptions :: PaletteCreationMethod -> Bool -> Int -> PaletteOptions
- Graphics.Image.IO.External: TGA :: TGA
- Graphics.Image.IO.External: TIF :: TIF
- Graphics.Image.IO.External: Uniform :: PaletteCreationMethod
- Graphics.Image.IO.External: [enableImageDithering] :: PaletteOptions -> Bool
- Graphics.Image.IO.External: [paletteColorCount] :: PaletteOptions -> Int
- Graphics.Image.IO.External: [paletteCreationMethod] :: PaletteOptions -> PaletteCreationMethod
- Graphics.Image.IO.External: class ImageFormat format where data family SaveOption format exts f = [ext f] isFormat e f = e `elem` exts f
- Graphics.Image.IO.External: class ImageFormat format => Readable img format
- Graphics.Image.IO.External: class ImageFormat format => Writable img format
- Graphics.Image.IO.External: data BMP
- Graphics.Image.IO.External: data GIF
- Graphics.Image.IO.External: data GifLooping :: *
- Graphics.Image.IO.External: data HDR
- Graphics.Image.IO.External: data InputFormat
- Graphics.Image.IO.External: data JPG
- Graphics.Image.IO.External: data OutputFormat
- Graphics.Image.IO.External: data PBM
- Graphics.Image.IO.External: data PGM
- Graphics.Image.IO.External: data PNG
- Graphics.Image.IO.External: data PPM
- Graphics.Image.IO.External: data PaletteCreationMethod :: *
- Graphics.Image.IO.External: data PaletteOptions :: *
- Graphics.Image.IO.External: data TGA
- Graphics.Image.IO.External: data TIF
- Graphics.Image.IO.External: decode :: Readable img format => format -> ByteString -> Either String img
- Graphics.Image.IO.External: encode :: Writable img format => format -> [SaveOption format] -> img -> ByteString
- Graphics.Image.IO.External: ext :: ImageFormat format => format -> String
- Graphics.Image.IO.External: exts :: ImageFormat format => format -> [String]
- Graphics.Image.IO.External: instance (Graphics.Image.IO.Base.Readable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.External.JuicyPixels.BMP, Graphics.Image.IO.Base.Readable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.External.JuicyPixels.GIF, Graphics.Image.IO.Base.Readable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.External.JuicyPixels.HDR, Graphics.Image.IO.Base.Readable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.External.JuicyPixels.JPG, Graphics.Image.IO.Base.Readable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.External.JuicyPixels.PNG, Graphics.Image.IO.Base.Readable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.External.JuicyPixels.TGA, Graphics.Image.IO.Base.Readable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.External.JuicyPixels.TIF, Graphics.Image.IO.Base.Readable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.External.Netpbm.PPM) => Graphics.Image.IO.Base.Readable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.External.InputFormat
- Graphics.Image.IO.External: instance (Graphics.Image.IO.Base.Writable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.External.JuicyPixels.BMP, Graphics.Image.IO.Base.Writable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.External.JuicyPixels.GIF, Graphics.Image.IO.Base.Writable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.External.JuicyPixels.HDR, Graphics.Image.IO.Base.Writable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.External.JuicyPixels.JPG, Graphics.Image.IO.Base.Writable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.External.JuicyPixels.PNG, Graphics.Image.IO.Base.Writable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.External.JuicyPixels.TGA, Graphics.Image.IO.Base.Writable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.External.JuicyPixels.TIF) => Graphics.Image.IO.Base.Writable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.External.OutputFormat
- Graphics.Image.IO.External: instance GHC.Classes.Eq Graphics.Image.IO.External.InputFormat
- Graphics.Image.IO.External: instance GHC.Classes.Eq Graphics.Image.IO.External.OutputFormat
- Graphics.Image.IO.External: instance GHC.Enum.Enum Graphics.Image.IO.External.InputFormat
- Graphics.Image.IO.External: instance GHC.Enum.Enum Graphics.Image.IO.External.OutputFormat
- Graphics.Image.IO.External: instance GHC.Show.Show Graphics.Image.IO.External.InputFormat
- Graphics.Image.IO.External: instance GHC.Show.Show Graphics.Image.IO.External.OutputFormat
- Graphics.Image.IO.External: instance Graphics.Image.IO.Base.ImageFormat Graphics.Image.IO.External.InputFormat
- Graphics.Image.IO.External: instance Graphics.Image.IO.Base.ImageFormat Graphics.Image.IO.External.OutputFormat
- Graphics.Image.IO.External: isFormat :: ImageFormat format => String -> format -> Bool
- Graphics.Image.IO.External: type GifDelay = Int
- Graphics.Image.Interface: (*>) :: Applicative f => f a -> f b -> f b
- Graphics.Image.Interface: (<$) :: Functor f => forall a b. a -> f b -> f a
- Graphics.Image.Interface: (<$>) :: Functor f => (a -> b) -> f a -> f b
- Graphics.Image.Interface: (<*) :: Applicative f => f a -> f b -> f a
- Graphics.Image.Interface: (<**>) :: Applicative f => f a -> f (a -> b) -> f b
- Graphics.Image.Interface: (<*>) :: Applicative f => f (a -> b) -> f a -> f b
- Graphics.Image.Interface: class Functor f => Applicative (f :: * -> *)
- Graphics.Image.Interface: instance (GHC.Float.Floating (Graphics.Image.Interface.Pixel cs e), GHC.Float.Floating e, Graphics.Image.Interface.Array arr cs e) => GHC.Float.Floating (Graphics.Image.Interface.Image arr cs e)
- Graphics.Image.Interface: instance (GHC.Real.Fractional (Graphics.Image.Interface.Pixel cs e), GHC.Real.Fractional e, Graphics.Image.Interface.Array arr cs e) => GHC.Real.Fractional (Graphics.Image.Interface.Image arr cs e)
- Graphics.Image.Interface: liftA :: Applicative f => (a -> b) -> f a -> f b
- Graphics.Image.Interface: liftA2 :: Applicative f => (a -> b -> c) -> f a -> f b -> f c
- Graphics.Image.Interface: liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
- Graphics.Image.Interface: pure :: Applicative f => a -> f a
+ Graphics.Image: borderIndex :: ManifestArray arr cs e => Border (Pixel cs e) -> Image arr cs e -> (Int, Int) -> Pixel cs e
+ Graphics.Image.ColorSpace: data family Pixel cs e;
+ Graphics.Image.ColorSpace: infix 6 +:
+ Graphics.Image.ColorSpace: type family Opaque cs;
+ Graphics.Image.ColorSpace: }
+ Graphics.Image.IO: ExternalViewer :: FilePath -> [String] -> Int -> ExternalViewer
+ Graphics.Image.IO: data ExternalViewer
+ Graphics.Image.IO: defaultViewer :: ExternalViewer
+ Graphics.Image.IO: displayImageFile :: ExternalViewer -> FilePath -> IO ()
+ Graphics.Image.IO: displayImageUsing :: Writable (Image arr cs e) TIF => ExternalViewer -> Bool -> Image arr cs e -> IO ()
+ Graphics.Image.IO: eogViewer :: ExternalViewer
+ Graphics.Image.IO: fehViewer :: ExternalViewer
+ Graphics.Image.IO: gimpViewer :: ExternalViewer
+ Graphics.Image.IO: gpicviewViewer :: ExternalViewer
+ Graphics.Image.IO: instance GHC.Show.Show Graphics.Image.IO.ExternalViewer
+ Graphics.Image.IO.Formats: BMP :: BMP
+ Graphics.Image.IO.Formats: GIF :: GIF
+ Graphics.Image.IO.Formats: HDR :: HDR
+ Graphics.Image.IO.Formats: JPG :: JPG
+ Graphics.Image.IO.Formats: LoopingForever :: GifLooping
+ Graphics.Image.IO.Formats: LoopingNever :: GifLooping
+ Graphics.Image.IO.Formats: LoopingRepeat :: Word16 -> GifLooping
+ Graphics.Image.IO.Formats: MedianMeanCut :: PaletteCreationMethod
+ Graphics.Image.IO.Formats: PBM :: PBM
+ Graphics.Image.IO.Formats: PGM :: PGM
+ Graphics.Image.IO.Formats: PNG :: PNG
+ Graphics.Image.IO.Formats: PPM :: PPM
+ Graphics.Image.IO.Formats: PaletteOptions :: PaletteCreationMethod -> Bool -> Int -> PaletteOptions
+ Graphics.Image.IO.Formats: TGA :: TGA
+ Graphics.Image.IO.Formats: TIF :: TIF
+ Graphics.Image.IO.Formats: Uniform :: PaletteCreationMethod
+ Graphics.Image.IO.Formats: [enableImageDithering] :: PaletteOptions -> Bool
+ Graphics.Image.IO.Formats: [paletteColorCount] :: PaletteOptions -> Int
+ Graphics.Image.IO.Formats: [paletteCreationMethod] :: PaletteOptions -> PaletteCreationMethod
+ Graphics.Image.IO.Formats: class ImageFormat format where data SaveOption format exts f = [ext f] isFormat e f = e `elem` exts f where {
+ Graphics.Image.IO.Formats: class ImageFormat format => Readable img format
+ Graphics.Image.IO.Formats: class ImageFormat format => Writable img format
+ Graphics.Image.IO.Formats: data BMP
+ Graphics.Image.IO.Formats: data GIF
+ Graphics.Image.IO.Formats: data GifLooping :: *
+ Graphics.Image.IO.Formats: data HDR
+ Graphics.Image.IO.Formats: data InputFormat
+ Graphics.Image.IO.Formats: data JPG
+ Graphics.Image.IO.Formats: data OutputFormat
+ Graphics.Image.IO.Formats: data PBM
+ Graphics.Image.IO.Formats: data PGM
+ Graphics.Image.IO.Formats: data PNG
+ Graphics.Image.IO.Formats: data PPM
+ Graphics.Image.IO.Formats: data PaletteCreationMethod :: *
+ Graphics.Image.IO.Formats: data PaletteOptions :: *
+ Graphics.Image.IO.Formats: data TGA
+ Graphics.Image.IO.Formats: data TIF
+ Graphics.Image.IO.Formats: data family SaveOption format;
+ Graphics.Image.IO.Formats: decode :: Readable img format => format -> ByteString -> Either String img
+ Graphics.Image.IO.Formats: encode :: Writable img format => format -> [SaveOption format] -> img -> ByteString
+ Graphics.Image.IO.Formats: ext :: ImageFormat format => format -> String
+ Graphics.Image.IO.Formats: exts :: ImageFormat format => format -> [String]
+ Graphics.Image.IO.Formats: instance (Graphics.Image.IO.Base.Readable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.Formats.JuicyPixels.BMP, Graphics.Image.IO.Base.Readable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.Formats.JuicyPixels.GIF, Graphics.Image.IO.Base.Readable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.Formats.JuicyPixels.HDR, Graphics.Image.IO.Base.Readable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.Formats.JuicyPixels.JPG, Graphics.Image.IO.Base.Readable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.Formats.JuicyPixels.PNG, Graphics.Image.IO.Base.Readable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.Formats.JuicyPixels.TGA, Graphics.Image.IO.Base.Readable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.Formats.JuicyPixels.TIF, Graphics.Image.IO.Base.Readable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.Formats.Netpbm.PPM) => Graphics.Image.IO.Base.Readable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.Formats.InputFormat
+ Graphics.Image.IO.Formats: instance (Graphics.Image.IO.Base.Writable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.Formats.JuicyPixels.BMP, Graphics.Image.IO.Base.Writable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.Formats.JuicyPixels.GIF, Graphics.Image.IO.Base.Writable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.Formats.JuicyPixels.HDR, Graphics.Image.IO.Base.Writable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.Formats.JuicyPixels.JPG, Graphics.Image.IO.Base.Writable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.Formats.JuicyPixels.PNG, Graphics.Image.IO.Base.Writable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.Formats.JuicyPixels.TGA, Graphics.Image.IO.Base.Writable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.Formats.JuicyPixels.TIF) => Graphics.Image.IO.Base.Writable (Graphics.Image.Interface.Image arr cs GHC.Types.Double) Graphics.Image.IO.Formats.OutputFormat
+ Graphics.Image.IO.Formats: instance GHC.Classes.Eq Graphics.Image.IO.Formats.InputFormat
+ Graphics.Image.IO.Formats: instance GHC.Classes.Eq Graphics.Image.IO.Formats.OutputFormat
+ Graphics.Image.IO.Formats: instance GHC.Enum.Enum Graphics.Image.IO.Formats.InputFormat
+ Graphics.Image.IO.Formats: instance GHC.Enum.Enum Graphics.Image.IO.Formats.OutputFormat
+ Graphics.Image.IO.Formats: instance GHC.Show.Show Graphics.Image.IO.Formats.InputFormat
+ Graphics.Image.IO.Formats: instance GHC.Show.Show Graphics.Image.IO.Formats.OutputFormat
+ Graphics.Image.IO.Formats: instance Graphics.Image.IO.Base.ImageFormat Graphics.Image.IO.Formats.InputFormat
+ Graphics.Image.IO.Formats: instance Graphics.Image.IO.Base.ImageFormat Graphics.Image.IO.Formats.OutputFormat
+ Graphics.Image.IO.Formats: isFormat :: ImageFormat format => String -> format -> Bool
+ Graphics.Image.IO.Formats: type GifDelay = Int
+ Graphics.Image.IO.Formats: }
+ Graphics.Image.IO.Histogram: type Histograms = [Histogram]
+ Graphics.Image.Interface: data family MImage st arr cs e;
+ Graphics.Image.Interface: handleBorderIndex :: Border (Pixel cs e) -> (Int, Int) -> ((Int, Int) -> Pixel cs e) -> (Int, Int) -> Pixel cs e
+ Graphics.Image.Interface: instance (GHC.Float.Floating (Graphics.Image.Interface.Pixel cs e), Graphics.Image.Interface.Array arr cs e) => GHC.Float.Floating (Graphics.Image.Interface.Image arr cs e)
+ Graphics.Image.Interface: instance (GHC.Real.Fractional (Graphics.Image.Interface.Pixel cs e), Graphics.Image.Interface.Array arr cs e) => GHC.Real.Fractional (Graphics.Image.Interface.Image arr cs e)
+ Graphics.Image.Interface: type Elt arr cs e = ();
+ Graphics.Image.Interface: type family Elt arr cs e :: Constraint;
+ Graphics.Image.Interface: }
+ Graphics.Image.Processing.Binary: infixr 2 .||.
+ Graphics.Image.Processing.Binary: infixr 3 .&&.
+ Graphics.Image.Processing.Complex: infix 6 !+!
+ Graphics.Image.Types: data family MImage st arr cs e;
+ Graphics.Image.Types: type Elt arr cs e = ();
+ Graphics.Image.Types: }
- Graphics.Image: displayImage :: (ManifestArray arr cs e, Writable (Image arr cs e) TIF) => Image arr cs e -> IO (Maybe ThreadId)
+ Graphics.Image: displayImage :: Writable (Image arr cs e) TIF => Image arr cs e -> IO ()
- Graphics.Image: writeImage :: (ManifestArray arr cs Double, Writable (Image arr cs Double) OutputFormat) => FilePath -> Image arr cs Double -> IO ()
+ Graphics.Image: writeImage :: Writable (Image arr cs e) OutputFormat => FilePath -> Image arr cs e -> IO ()
- Graphics.Image.ColorSpace: (:+) :: SrictNotUnpackeda -> SrictNotUnpackeda -> Complex a
+ Graphics.Image.ColorSpace: (:+) :: ~a -> ~a -> Complex a
- Graphics.Image.ColorSpace: class (ColorSpace (Opaque cs), ColorSpace cs) => Alpha cs where type family Opaque cs
+ Graphics.Image.ColorSpace: class (ColorSpace (Opaque cs), ColorSpace cs) => Alpha cs where type Opaque cs where {
- Graphics.Image.ColorSpace: class (Eq cs, Enum cs, Show cs, Typeable cs) => ColorSpace cs where data family Pixel cs e
+ Graphics.Image.ColorSpace: class (Eq cs, Enum cs, Show cs, Typeable cs) => ColorSpace cs where data Pixel cs e where {
- Graphics.Image.ColorSpace: fromGrayImages :: (Array arr Gray e, Array arr cs e) => [Image arr Gray e] -> [cs] -> Image arr cs e
+ Graphics.Image.ColorSpace: fromGrayImages :: forall arr cs e. (Array arr Gray e, Array arr cs e) => [Image arr Gray e] -> [cs] -> Image arr cs e
- Graphics.Image.ColorSpace: imagPart :: (ColorSpace cs, RealFloat e) => Pixel cs (Complex e) -> Pixel cs e
+ Graphics.Image.ColorSpace: imagPart :: ColorSpace cs => Pixel cs (Complex e) -> Pixel cs e
- Graphics.Image.ColorSpace: realPart :: (ColorSpace cs, RealFloat e) => Pixel cs (Complex e) -> Pixel cs e
+ Graphics.Image.ColorSpace: realPart :: ColorSpace cs => Pixel cs (Complex e) -> Pixel cs e
- Graphics.Image.IO: displayImage :: (ManifestArray arr cs e, Writable (Image arr cs e) TIF) => Image arr cs e -> IO (Maybe ThreadId)
+ Graphics.Image.IO: displayImage :: Writable (Image arr cs e) TIF => Image arr cs e -> IO ()
- Graphics.Image.IO: writeImage :: (ManifestArray arr cs Double, Writable (Image arr cs Double) OutputFormat) => FilePath -> Image arr cs Double -> IO ()
+ Graphics.Image.IO: writeImage :: Writable (Image arr cs e) OutputFormat => FilePath -> Image arr cs e -> IO ()
- Graphics.Image.IO.Histogram: displayHistograms :: [Histogram] -> IO (Maybe ThreadId)
+ Graphics.Image.IO.Histogram: displayHistograms :: Histograms -> IO ()
- Graphics.Image.IO.Histogram: getHistograms :: (SequentialArray arr Gray e, SequentialArray arr cs e, Elevator e) => Image arr cs e -> [Histogram]
+ Graphics.Image.IO.Histogram: getHistograms :: forall arr cs e. (SequentialArray arr Gray e, SequentialArray arr cs e, Elevator e) => Image arr cs e -> Histograms
- Graphics.Image.IO.Histogram: writeHistograms :: FilePath -> [Histogram] -> IO ()
+ Graphics.Image.IO.Histogram: writeHistograms :: FilePath -> Histograms -> IO ()
- Graphics.Image.Interface: borderIndex :: Border (Pixel cs e) -> (Int, Int) -> ((Int, Int) -> Pixel cs e) -> (Int, Int) -> Pixel cs e
+ Graphics.Image.Interface: borderIndex :: ManifestArray arr cs e => Border (Pixel cs e) -> Image arr cs e -> (Int, Int) -> Pixel cs e
- Graphics.Image.Interface: class (ColorSpace (Opaque cs), ColorSpace cs) => Alpha cs where type family Opaque cs
+ Graphics.Image.Interface: class (ColorSpace (Opaque cs), ColorSpace cs) => Alpha cs where type Opaque cs where {
- Graphics.Image.Interface: class (Show arr, ColorSpace cs, Num (Pixel cs e), Functor (Pixel cs), Applicative (Pixel cs), Foldable (Pixel cs), Num e, Typeable e, Elt arr cs e) => Array arr cs e where type family Elt arr cs e :: Constraint data family Image arr cs e Elt arr cs e = ()
+ Graphics.Image.Interface: class (Show arr, ColorSpace cs, Num (Pixel cs e), Functor (Pixel cs), Applicative (Pixel cs), Foldable (Pixel cs), Num e, Typeable e, Elt arr cs e) => Array arr cs e where type Elt arr cs e :: Constraint data Image arr cs e type Elt arr cs e = () where {
- Graphics.Image.Interface: class (Eq cs, Enum cs, Show cs, Typeable cs) => ColorSpace cs where type family PixelElt cs e data family Pixel cs e
+ Graphics.Image.Interface: class (Eq cs, Enum cs, Show cs, Typeable cs) => ColorSpace cs where type PixelElt cs e data Pixel cs e where {
- Graphics.Image.Interface: class ManifestArray arr cs e => MutableArray arr cs e where data family MImage st arr cs e
+ Graphics.Image.Interface: class ManifestArray arr cs e => MutableArray arr cs e where data MImage st arr cs e where {
- Graphics.Image.Interface.Repa: fromRepaArray :: (ColorSpace cs, Unbox (PixelElt cs e)) => Array D DIM2 (Pixel cs e) -> Image RD cs e
+ Graphics.Image.Interface.Repa: fromRepaArray :: Array D DIM2 (Pixel cs e) -> Image RD cs e
- Graphics.Image.Processing.Complex: fft :: (ManifestArray arr cs (Complex e), Num e, RealFloat e) => Image arr cs (Complex e) -> Image arr cs (Complex e)
+ Graphics.Image.Processing.Complex: fft :: (ManifestArray arr cs (Complex e), RealFloat e) => Image arr cs (Complex e) -> Image arr cs (Complex e)
- Graphics.Image.Processing.Complex: ifft :: (ManifestArray arr cs (Complex e), Num e, RealFloat e) => Image arr cs (Complex e) -> Image arr cs (Complex e)
+ Graphics.Image.Processing.Complex: ifft :: (ManifestArray arr cs (Complex e), RealFloat e) => Image arr cs (Complex e) -> Image arr cs (Complex e)
- Graphics.Image.Processing.Complex: imagPart' :: (Array arr cs e, Array arr cs (Complex e), RealFloat e) => Image arr cs (Complex e) -> Image arr cs e
+ Graphics.Image.Processing.Complex: imagPart' :: (Array arr cs e, Array arr cs (Complex e)) => Image arr cs (Complex e) -> Image arr cs e
- Graphics.Image.Processing.Complex: realPart' :: (Array arr cs e, Array arr cs (Complex e), RealFloat e) => Image arr cs (Complex e) -> Image arr cs e
+ Graphics.Image.Processing.Complex: realPart' :: (Array arr cs e, Array arr cs (Complex e)) => Image arr cs (Complex e) -> Image arr cs e
- Graphics.Image.Types: class (Show arr, ColorSpace cs, Num (Pixel cs e), Functor (Pixel cs), Applicative (Pixel cs), Foldable (Pixel cs), Num e, Typeable e, Elt arr cs e) => Array arr cs e where data family Image arr cs e Elt arr cs e = ()
+ Graphics.Image.Types: class (Show arr, ColorSpace cs, Num (Pixel cs e), Functor (Pixel cs), Applicative (Pixel cs), Foldable (Pixel cs), Num e, Typeable e, Elt arr cs e) => Array arr cs e where data Image arr cs e type Elt arr cs e = () where {
- Graphics.Image.Types: class ManifestArray arr cs e => MutableArray arr cs e where data family MImage st arr cs e
+ Graphics.Image.Types: class ManifestArray arr cs e => MutableArray arr cs e where data MImage st arr cs e where {
Files
- CHANGELOG.md +36/−0
- README.md +21/−0
- hip.cabal +36/−19
- images/frog_histogram.png binary
- images/frog_histogram.svg +3/−0
- src/Graphics/Image.hs +6/−4
- src/Graphics/Image/ColorSpace.hs +34/−32
- src/Graphics/Image/ColorSpace/Binary.hs +5/−2
- src/Graphics/Image/ColorSpace/CMYK.hs +5/−2
- src/Graphics/Image/ColorSpace/Complex.hs +2/−2
- src/Graphics/Image/ColorSpace/Gray.hs +6/−2
- src/Graphics/Image/ColorSpace/HSI.hs +5/−2
- src/Graphics/Image/ColorSpace/Luma.hs +5/−2
- src/Graphics/Image/ColorSpace/RGB.hs +5/−2
- src/Graphics/Image/ColorSpace/YCbCr.hs +5/−2
- src/Graphics/Image/IO.hs +111/−62
- src/Graphics/Image/IO/Base.hs +4/−20
- src/Graphics/Image/IO/External.hs +0/−114
- src/Graphics/Image/IO/External/JuicyPixels.hs +0/−1092
- src/Graphics/Image/IO/External/Netpbm.hs +0/−297
- src/Graphics/Image/IO/Formats.hs +117/−0
- src/Graphics/Image/IO/Formats/JuicyPixels.hs +1096/−0
- src/Graphics/Image/IO/Formats/Netpbm.hs +300/−0
- src/Graphics/Image/IO/Histogram.hs +48/−49
- src/Graphics/Image/Interface.hs +35/−17
- src/Graphics/Image/Interface/Repa/Internal.hs +27/−23
- src/Graphics/Image/Interface/Vector/Unboxed.hs +9/−3
- src/Graphics/Image/Interface/Vector/Unboxing.hs +57/−47
- src/Graphics/Image/Processing.hs +3/−1
- src/Graphics/Image/Processing/Binary.hs +9/−2
- src/Graphics/Image/Processing/Complex.hs +5/−4
- src/Graphics/Image/Processing/Complex/Fourier.hs +6/−3
- src/Graphics/Image/Processing/Convolution.hs +1/−1
- src/Graphics/Image/Processing/Geometric.hs +3/−1
- src/Graphics/Image/Processing/Interpolation.hs +4/−3
- src/Graphics/Image/Types.hs +2/−2
- tests/Graphics/Image/ColorSpaceSpec.hs +36/−0
- tests/Spec.hs +1/−0
+ CHANGELOG.md view
@@ -0,0 +1,36 @@+1.1.0.0+=======++* GHC 8 support.+* Improved IO:+ * OS default image viewer is used for displaying images with ability to use a custom one.+ * Histogram plotting is done using diagrams instead of cairo backend,+ significantly simplifying installation+ ++1.0.2.0+=======++* Changed the way image displaying works. Now `displayImage` function will try+ to automatically detect the default external viewer program.+* Made Histogram plotting using Chart dependency optional, which is controlled+ by a compile time flag `use-chart`.+* Renamed module `Graphics.Image.IO.External` to `Graphics.Image.IO.Formats`,+ so it reflects the purpose slightly better.++1.0.1.2+=======++* Added support of "vector>=0.11.0.0"++1.0.1.1+=======++* Added `rotate` function.+* Fixed writing `RGBA` files with `writeImage` (#2).++1.0.1+=====++* Made it compatible with GHC >= 7.4 (#1)+* Added histogram plotting using Charts
+ README.md view
@@ -0,0 +1,21 @@+Haskell Image Processing Library+================================++Haskell Image Processing (HIP) Library++Documentation is on [Hackage](http://hackage.haskell.org/package/hip).++Installation+------------++Install HIP using `cabal`:++* `$ cabal update && cabal install hip`++and using `stack` (from source code only, not yet on stackage):+* `$ stack install`++In order to be able to view images in GHCi and external image viewer is used. On+Linux I recommend `GPicView`, but you can use any viewer that accepts a filename+as an argument, so by default OS specific image viewer is used.+
hip.cabal view
@@ -1,5 +1,5 @@ Name: hip-Version: 1.0.1.2+Version: 1.1.0.0 License: BSD3 License-File: LICENSE Author: Alexey Kuleshevich@@ -11,7 +11,7 @@ . Haskell Image Processing (HIP) Library provides an easy to use interface with a whole variaty of image manipulation capabilities. .- Processing can be done sequentially as well as in parallel, with an inherited fusion capabily, all through <https://hackage.haskell.org/package/repa repa> and <https://hackage.haskell.org/package/vector vector> packages. It is highly extendable, with an ability to add custom color spaces or use some other underlying data structure.+ Processing can be done sequentially as well as in parallel, with an inherited fusion capabily, all through <https://hackage.haskell.org/package/repa repa> and <https://hackage.haskell.org/package/vector vector> packages. It is highly extendable, with an ability to add various color spaces or provide implementations for underlying array like custom data structures. . It is capable of reading and writing a number of popular image formats by using <https://hackage.haskell.org/package/JuicyPixels JuciyPixels> and <https://hackage.haskell.org/package/netpbm netpbm> packages. Being a pure Haskell library it does not require any external programs, although it can display images using a program of your choice. Homepage: https://github.com/lehins/hip@@ -20,25 +20,28 @@ Build-Type: Simple Extra-Doc-Files: images/*.jpg , images/*.png-+ , images/*.svg+ , README.md+ CHANGELOG.md Library Default-Language: Haskell2010 HS-Source-Dirs: src- Build-Depends: base >= 4.5 && < 5++ Build-Depends: base >= 4.5 && < 5 , bytestring >= 0.9.0.4+ , Chart >= 1.5+ , Chart-diagrams >= 1.5+ , colour >= 2.3.3 , deepseq >= 1.1+ , directory >= 1.2.2.0 , filepath >= 1.0 , JuicyPixels >= 3.2.7 , netpbm >= 1.0.1- , Chart >= 1.5- , Chart-cairo >= 1.5- , colour >= 2.3.3 , primitive >= 0.4 , process >= 1.1.0.0 , repa >= 3.2.1.1 && < 4 , temporary >= 1.1.1- , vector >= 0.10 && < 0.11- + , vector >= 0.10 Other-Extensions: BangPatterns , ConstraintKinds , CPP@@ -50,11 +53,10 @@ , TypeFamilies , UndecidableInstances , ViewPatterns- Exposed-Modules: Graphics.Image , Graphics.Image.ColorSpace , Graphics.Image.IO- , Graphics.Image.IO.External+ , Graphics.Image.IO.Formats , Graphics.Image.IO.Histogram , Graphics.Image.Interface , Graphics.Image.Interface.Repa@@ -63,7 +65,6 @@ , Graphics.Image.Processing.Binary , Graphics.Image.Processing.Complex , Graphics.Image.Types- Other-Modules: Graphics.Image.ColorSpace.Binary , Graphics.Image.ColorSpace.CMYK , Graphics.Image.ColorSpace.Complex@@ -73,8 +74,8 @@ , Graphics.Image.ColorSpace.RGB , Graphics.Image.ColorSpace.YCbCr , Graphics.Image.IO.Base- , Graphics.Image.IO.External.JuicyPixels- , Graphics.Image.IO.External.Netpbm+ , Graphics.Image.IO.Formats.JuicyPixels+ , Graphics.Image.IO.Formats.Netpbm , Graphics.Image.Interface.Repa.Internal , Graphics.Image.Interface.Vector.Unboxed , Graphics.Image.Interface.Vector.Unboxing@@ -82,11 +83,27 @@ , Graphics.Image.Processing.Complex.Fourier , Graphics.Image.Processing.Geometric , Graphics.Image.Processing.Interpolation- - GHC-Options:- -Wall- -Odph- -fcpr-off+ GHC-Options: -Wall+ if os(windows)+ CPP-Options: -DOS_Win32+ else+ if os(linux)+ CPP-Options: -DOS_Linux+ else+ if os(darwin)+ CPP-Options: -DOS_Mac++Test-Suite hip-tests+ Type: exitcode-stdio-1.0+ HS-Source-Dirs: tests+ Main-Is: Spec.hs+ Other-Modules: Graphics.Image.ColorSpaceSpec+ Build-Depends: base >= 4.5 && < 5+ , hip+ , hspec+ , QuickCheck+ Default-Language: Haskell2010+ GHC-Options: -Wall Source-Repository head Type: git
− images/frog_histogram.png
binary file changed (42457 → absent bytes)
+ images/frog_histogram.svg view
@@ -0,0 +1,3 @@+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" height="600.0000" stroke-opacity="1" viewBox="0 0 800 600" font-size="1" width="800.0000" xmlns:xlink="http://www.w3.org/1999/xlink" stroke="rgb(0,0,0)" version="1.1"><defs></defs><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(255,255,255)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 0.0000,0.0000 v 600.0000 h 800.0000 v -600.0000 Z"/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 365.5185,14.1016 ZM 366.7043,4.0606 h 2.2639 v 3.8655 h 3.4651 v -3.8655 h 2.2793 v 10.0411 h -2.2793 v -4.1889 h -3.4651 v 4.1889 h -2.2639 v -10.0411 ZM 375.8984,14.1016 ZM 378.0236,5.3388 c -0.5698,-0.0000 -0.9394,-0.3311 -0.9394 -0.3311c -0.3696,-0.3311 -0.3696,-0.8547 -0.3696 -0.8547c 0.0000,-0.5236 0.3696,-0.8470 0.3696 -0.8470c 0.3696,-0.3234 0.9394,-0.3234 0.9394 -0.3234c 0.5852,0.0000 0.9471,0.3234 0.9471 0.3234c 0.3619,0.3234 0.3619,0.8470 0.3619 0.8470c 0.0000,0.5236 -0.3619,0.8547 -0.3619 0.8547c -0.3619,0.3311 -0.9471,0.3311 -0.9471 0.3311ZM 378.0236,5.3388 ZM 376.8994,6.4630 h 2.2639 v 7.6386 h -2.2639 v -7.6386 ZM 380.1489,14.1016 ZM 381.4887,11.8070 c 0.5236,0.4004 1.0010,0.6006 1.0010 0.6006c 0.4774,0.2002 0.9702,0.2002 0.9702 0.2002c 0.5082,0.0000 0.7392,-0.1694 0.7392 -0.1694c 0.2310,-0.1694 0.2310,-0.4774 0.2310 -0.4774c 0.0000,-0.1848 -0.1309,-0.3311 -0.1309 -0.3311c -0.1309,-0.1463 -0.3542,-0.2695 -0.3542 -0.2695c -0.2233,-0.1232 -0.5005,-0.2233 -0.5005 -0.2233c -0.2772,-0.1001 -0.5698,-0.2233 -0.5698 -0.2233c -0.3542,-0.1386 -0.7084,-0.3234 -0.7084 -0.3234c -0.3542,-0.1848 -0.6468,-0.4543 -0.6468 -0.4543c -0.2926,-0.2695 -0.4774,-0.6314 -0.4774 -0.6314c -0.1848,-0.3619 -0.1848,-0.8393 -0.1848 -0.8393c 0.0000,-0.5236 0.2079,-0.9702 0.2079 -0.9702c 0.2079,-0.4466 0.5929,-0.7546 0.5929 -0.7546c 0.3850,-0.3080 0.9240,-0.4851 0.9240 -0.4851c 0.5390,-0.1771 1.2012,-0.1771 1.2012 -0.1771c 0.8778,0.0000 1.5400,0.3003 1.5400 0.3003c 0.6622,0.3003 1.1550,0.6699 1.1550 0.6699l -1.0164,1.3552 c -0.4158,-0.3080 -0.8162,-0.4774 -0.8162 -0.4774c -0.4004,-0.1694 -0.8008,-0.1694 -0.8008 -0.1694c -0.8624,-0.0000 -0.8624,0.6006 -0.8624 0.6006c 0.0000,0.1848 0.1232,0.3157 0.1232 0.3157c 0.1232,0.1309 0.3311,0.2387 0.3311 0.2387c 0.2079,0.1078 0.4774,0.2079 0.4774 0.2079c 0.2695,0.1001 0.5621,0.2079 0.5621 0.2079c 0.3696,0.1386 0.7315,0.3157 0.7315 0.3157c 0.3619,0.1771 0.6622,0.4389 0.6622 0.4389c 0.3003,0.2618 0.4851,0.6391 0.4851 0.6391c 0.1848,0.3773 0.1848,0.9009 0.1848 0.9009c 0.0000,0.5236 -0.2002,0.9702 -0.2002 0.9702c -0.2002,0.4466 -0.6006,0.7777 -0.6006 0.7777c -0.4004,0.3311 -0.9856,0.5236 -0.9856 0.5236c -0.5852,0.1925 -1.3552,0.1925 -1.3552 0.1925c -0.7546,-0.0000 -1.5477,-0.2926 -1.5477 -0.2926c -0.7931,-0.2926 -1.3783,-0.7700 -1.3783 -0.7700ZM 386.9713,14.1016 ZM 388.2803,8.2341 h -1.0472 v -1.6786 l 1.1704,-0.0924 l 0.2618,-2.0329 h 1.8789 v 2.0329 h 1.8326 v 1.7710 h -1.8326 v 3.0647 c 0.0000,0.6468 0.2695,0.9317 0.2695 0.9317c 0.2695,0.2849 0.7161,0.2849 0.7161 0.2849c 0.1848,0.0000 0.3773,-0.0462 0.3773 -0.0462c 0.1925,-0.0462 0.3465,-0.1078 0.3465 -0.1078l 0.3542,1.6478 c -0.3080,0.0924 -0.7238,0.1848 -0.7238 0.1848c -0.4158,0.0924 -0.9702,0.0924 -0.9702 0.0924c -0.7084,-0.0000 -1.2089,-0.2156 -1.2089 -0.2156c -0.5005,-0.2156 -0.8162,-0.6006 -0.8162 -0.6006c -0.3157,-0.3850 -0.4620,-0.9317 -0.4620 -0.9317c -0.1463,-0.5467 -0.1463,-1.2089 -0.1463 -1.2089v -3.0955 ZM 392.7156,14.1016 ZM 393.2700,10.2823 c 0.0000,-0.9548 0.3080,-1.7017 0.3080 -1.7017c 0.3080,-0.7469 0.8239,-1.2551 0.8239 -1.2551c 0.5159,-0.5082 1.1935,-0.7777 1.1935 -0.7777c 0.6776,-0.2695 1.4014,-0.2695 1.4014 -0.2695c 0.7238,0.0000 1.3937,0.2695 1.3937 0.2695c 0.6699,0.2695 1.1858,0.7777 1.1858 0.7777c 0.5159,0.5082 0.8239,1.2551 0.8239 1.2551c 0.3080,0.7469 0.3080,1.7017 0.3080 1.7017c 0.0000,0.9548 -0.3080,1.7017 -0.3080 1.7017c -0.3080,0.7469 -0.8239,1.2551 -0.8239 1.2551c -0.5159,0.5082 -1.1858,0.7777 -1.1858 0.7777c -0.6699,0.2695 -1.3937,0.2695 -1.3937 0.2695c -0.7238,-0.0000 -1.4014,-0.2695 -1.4014 -0.2695c -0.6776,-0.2695 -1.1935,-0.7777 -1.1935 -0.7777c -0.5159,-0.5082 -0.8239,-1.2551 -0.8239 -1.2551c -0.3080,-0.7469 -0.3080,-1.7017 -0.3080 -1.7017ZM 393.2700,10.2823 ZM 395.5955,10.2823 c 0.0000,1.0010 0.3465,1.5862 0.3465 1.5862c 0.3465,0.5852 1.0549,0.5852 1.0549 0.5852c 0.6930,0.0000 1.0472,-0.5852 1.0472 -0.5852c 0.3542,-0.5852 0.3542,-1.5862 0.3542 -1.5862c 0.0000,-1.0010 -0.3542,-1.5862 -0.3542 -1.5862c -0.3542,-0.5852 -1.0472,-0.5852 -1.0472 -0.5852c -0.7084,-0.0000 -1.0549,0.5852 -1.0549 0.5852c -0.3465,0.5852 -0.3465,1.5862 -0.3465 1.5862ZM 401.2628,14.1016 ZM 403.6499,15.0565 c 0.0000,0.4312 0.4620,0.6545 0.4620 0.6545c 0.4620,0.2233 1.2320,0.2233 1.2320 0.2233c 0.7700,0.0000 1.2628,-0.2695 1.2628 -0.2695c 0.4928,-0.2695 0.4928,-0.6699 0.4928 -0.6699c 0.0000,-0.3542 -0.3003,-0.4774 -0.3003 -0.4774c -0.3003,-0.1232 -0.8701,-0.1232 -0.8701 -0.1232h -0.7854 c -0.4004,-0.0000 -0.6468,-0.0231 -0.6468 -0.0231c -0.2464,-0.0231 -0.4312,-0.0693 -0.4312 -0.0693c -0.4158,0.3696 -0.4158,0.7546 -0.4158 0.7546ZM 403.6499,15.0565 ZM 401.7864,15.4107 c 0.0000,-0.9240 1.0934,-1.5400 1.0934 -1.5400v -0.0616 c -0.3080,-0.2002 -0.5082,-0.5082 -0.5082 -0.5082c -0.2002,-0.3080 -0.2002,-0.7854 -0.2002 -0.7854c 0.0000,-0.4158 0.2464,-0.7931 0.2464 -0.7931c 0.2464,-0.3773 0.6160,-0.6391 0.6160 -0.6391v -0.0616 c -0.4004,-0.2772 -0.7161,-0.7931 -0.7161 -0.7931c -0.3157,-0.5159 -0.3157,-1.1935 -0.3157 -1.1935c 0.0000,-0.6930 0.2618,-1.2089 0.2618 -1.2089c 0.2618,-0.5159 0.7007,-0.8624 0.7007 -0.8624c 0.4389,-0.3465 1.0087,-0.5159 1.0087 -0.5159c 0.5698,-0.1694 1.1858,-0.1694 1.1858 -0.1694c 0.6776,0.0000 1.1858,0.1848 1.1858 0.1848h 2.7875 v 1.6478 h -1.2166 c 0.1078,0.1694 0.1771,0.4312 0.1771 0.4312c 0.0693,0.2618 0.0693,0.5698 0.0693 0.5698c 0.0000,0.6622 -0.2310,1.1473 -0.2310 1.1473c -0.2310,0.4851 -0.6391,0.8008 -0.6391 0.8008c -0.4081,0.3157 -0.9548,0.4697 -0.9548 0.4697c -0.5467,0.1540 -1.1781,0.1540 -1.1781 0.1540c -0.4466,-0.0000 -0.9240,-0.1540 -0.9240 -0.1540c -0.1540,0.1232 -0.2156,0.2464 -0.2156 0.2464c -0.0616,0.1232 -0.0616,0.3234 -0.0616 0.3234c 0.0000,0.2926 0.2541,0.4312 0.2541 0.4312c 0.2541,0.1386 0.9009,0.1386 0.9009 0.1386h 1.2320 c 1.4168,0.0000 2.1638,0.4543 2.1638 0.4543c 0.7469,0.4543 0.7469,1.4861 0.7469 1.4861c 0.0000,0.6006 -0.3003,1.1011 -0.3003 1.1011c -0.3003,0.5005 -0.8547,0.8624 -0.8547 0.8624c -0.5544,0.3619 -1.3398,0.5698 -1.3398 0.5698c -0.7854,0.2079 -1.7710,0.2079 -1.7710 0.2079c -0.6776,-0.0000 -1.2551,-0.1155 -1.2551 -0.1155c -0.5775,-0.1155 -1.0164,-0.3465 -1.0164 -0.3465c -0.4389,-0.2310 -0.6853,-0.6006 -0.6853 -0.6006c -0.2464,-0.3696 -0.2464,-0.8778 -0.2464 -0.8778ZM 401.7864,15.4107 ZM 405.1591,10.3131 c 0.4466,0.0000 0.7469,-0.3157 0.7469 -0.3157c 0.3003,-0.3157 0.3003,-0.9625 0.3003 -0.9625c 0.0000,-0.6006 -0.3003,-0.9163 -0.3003 -0.9163c -0.3003,-0.3157 -0.7469,-0.3157 -0.7469 -0.3157c -0.4466,-0.0000 -0.7469,0.3080 -0.7469 0.3080c -0.3003,0.3080 -0.3003,0.9240 -0.3003 0.9240c 0.0000,0.6468 0.3003,0.9625 0.3003 0.9625c 0.3003,0.3157 0.7469,0.3157 0.7469 0.3157ZM 409.4867,14.1016 ZM 410.4877,6.4630 h 1.8480 l 0.1540,1.3398 h 0.0616 c 0.4158,-0.7854 1.0010,-1.1550 1.0010 -1.1550c 0.5852,-0.3696 1.1704,-0.3696 1.1704 -0.3696c 0.3234,0.0000 0.5313,0.0385 0.5313 0.0385c 0.2079,0.0385 0.3773,0.1155 0.3773 0.1155l -0.3696,1.9559 c -0.2156,-0.0616 -0.4004,-0.0924 -0.4004 -0.0924c -0.1848,-0.0308 -0.4312,-0.0308 -0.4312 -0.0308c -0.4312,-0.0000 -0.9009,0.3080 -0.9009 0.3080c -0.4697,0.3080 -0.7777,1.0934 -0.7777 1.0934v 4.4353 h -2.2639 v -7.6386 ZM 415.1694,14.1016 ZM 415.8932,11.9764 c 0.0000,-1.2012 1.0164,-1.8789 1.0164 -1.8789c 1.0164,-0.6776 3.2803,-0.9086 3.2803 -0.9086c -0.0308,-0.5082 -0.3080,-0.8085 -0.3080 -0.8085c -0.2772,-0.3003 -0.8932,-0.3003 -0.8932 -0.3003c -0.4928,-0.0000 -0.9856,0.1848 -0.9856 0.1848c -0.4928,0.1848 -1.0472,0.5082 -1.0472 0.5082l -0.8008,-1.4938 c 0.7392,-0.4466 1.5477,-0.7238 1.5477 -0.7238c 0.8085,-0.2772 1.7171,-0.2772 1.7171 -0.2772c 1.4784,0.0000 2.2562,0.8393 2.2562 0.8393c 0.7777,0.8393 0.7777,2.6104 0.7777 2.6104v 4.3737 h -1.8480 l -0.1694,-0.7854 h -0.0462 c -0.4928,0.4312 -1.0395,0.7007 -1.0395 0.7007c -0.5467,0.2695 -1.1935,0.2695 -1.1935 0.2695c -0.5236,-0.0000 -0.9394,-0.1771 -0.9394 -0.1771c -0.4158,-0.1771 -0.7084,-0.4928 -0.7084 -0.4928c -0.2926,-0.3157 -0.4543,-0.7315 -0.4543 -0.7315c -0.1617,-0.4158 -0.1617,-0.9086 -0.1617 -0.9086ZM 415.8932,11.9764 ZM 418.0493,11.8070 c 0.0000,0.3696 0.2387,0.5467 0.2387 0.5467c 0.2387,0.1771 0.6391,0.1771 0.6391 0.1771c 0.4004,0.0000 0.6776,-0.1694 0.6776 -0.1694c 0.2772,-0.1694 0.5852,-0.4774 0.5852 -0.4774v -1.3398 c -1.2166,0.1694 -1.6786,0.4928 -1.6786 0.4928c -0.4620,0.3234 -0.4620,0.7700 -0.4620 0.7700ZM 423.3932,14.1016 ZM 424.3943,6.4630 h 1.8480 l 0.1540,0.9856 h 0.0616 c 0.4774,-0.4774 1.0164,-0.8239 1.0164 -0.8239c 0.5390,-0.3465 1.2936,-0.3465 1.2936 -0.3465c 0.8162,0.0000 1.3167,0.3311 1.3167 0.3311c 0.5005,0.3311 0.7931,0.9471 0.7931 0.9471c 0.5082,-0.5236 1.0703,-0.9009 1.0703 -0.9009c 0.5621,-0.3773 1.3321,-0.3773 1.3321 -0.3773c 1.2320,0.0000 1.8095,0.8239 1.8095 0.8239c 0.5775,0.8239 0.5775,2.2562 0.5775 2.2562v 4.7433 h -2.2639 v -4.4507 c 0.0000,-0.8316 -0.2233,-1.1396 -0.2233 -1.1396c -0.2233,-0.3080 -0.7161,-0.3080 -0.7161 -0.3080c -0.5698,-0.0000 -1.3090,0.7392 -1.3090 0.7392v 5.1591 h -2.2639 v -4.4507 c 0.0000,-0.8316 -0.2233,-1.1396 -0.2233 -1.1396c -0.2233,-0.3080 -0.7161,-0.3080 -0.7161 -0.3080c -0.5852,-0.0000 -1.2936,0.7392 -1.2936 0.7392v 5.1591 h -2.2639 v -7.6386 Z"/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(211,211,211)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="butt" stroke-miterlimit="10.0" stroke-dasharray="4.999999999999998,4.999999999999998"><path d="M 40.0420,35.0000 v 515.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(211,211,211)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="butt" stroke-miterlimit="10.0" stroke-dasharray="4.999999999999998,4.999999999999998"><path d="M 97.1610,35.0000 v 515.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(211,211,211)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="butt" stroke-miterlimit="10.0" stroke-dasharray="4.999999999999998,4.999999999999998"><path d="M 154.2801,35.0000 v 515.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(211,211,211)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="butt" stroke-miterlimit="10.0" stroke-dasharray="4.999999999999998,4.999999999999998"><path d="M 211.3991,35.0000 v 515.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(211,211,211)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="butt" stroke-miterlimit="10.0" stroke-dasharray="4.999999999999998,4.999999999999998"><path d="M 268.5181,35.0000 v 515.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(211,211,211)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="butt" stroke-miterlimit="10.0" stroke-dasharray="4.999999999999998,4.999999999999998"><path d="M 325.6371,35.0000 v 515.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(211,211,211)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="butt" stroke-miterlimit="10.0" stroke-dasharray="4.999999999999998,4.999999999999998"><path d="M 382.7561,35.0000 v 515.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(211,211,211)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="butt" stroke-miterlimit="10.0" stroke-dasharray="4.999999999999998,4.999999999999998"><path d="M 439.8752,35.0000 v 515.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(211,211,211)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="butt" stroke-miterlimit="10.0" stroke-dasharray="4.999999999999998,4.999999999999998"><path d="M 496.9942,35.0000 v 515.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(211,211,211)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="butt" stroke-miterlimit="10.0" stroke-dasharray="4.999999999999998,4.999999999999998"><path d="M 554.1132,35.0000 v 515.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(211,211,211)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="butt" stroke-miterlimit="10.0" stroke-dasharray="4.999999999999998,4.999999999999998"><path d="M 611.2322,35.0000 v 515.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(211,211,211)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="butt" stroke-miterlimit="10.0" stroke-dasharray="4.999999999999998,4.999999999999998"><path d="M 668.3512,35.0000 v 515.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(211,211,211)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="butt" stroke-miterlimit="10.0" stroke-dasharray="4.999999999999998,4.999999999999998"><path d="M 725.4703,35.0000 v 515.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(211,211,211)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="butt" stroke-miterlimit="10.0" stroke-dasharray="4.999999999999998,4.999999999999998"><path d="M 782.5893,35.0000 v 515.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(211,211,211)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="butt" stroke-miterlimit="10.0" stroke-dasharray="4.999999999999998,4.999999999999998"><path d="M 40.0420,550.0000 h 742.5473 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(211,211,211)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="butt" stroke-miterlimit="10.0" stroke-dasharray="4.999999999999998,4.999999999999998"><path d="M 40.0420,421.2500 h 742.5473 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(211,211,211)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="butt" stroke-miterlimit="10.0" stroke-dasharray="4.999999999999998,4.999999999999998"><path d="M 40.0420,292.5000 h 742.5473 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(211,211,211)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="butt" stroke-miterlimit="10.0" stroke-dasharray="4.999999999999998,4.999999999999998"><path d="M 40.0420,163.7500 h 742.5473 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(211,211,211)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-dashoffset="0.0" stroke-linecap="butt" stroke-miterlimit="10.0" stroke-dasharray="4.999999999999998,4.999999999999998"><path d="M 40.0420,35.0000 h 742.5473 "/></g><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(255,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><defs><clipPath id="myClip1"><path d="M 40.0420,35.0000 v 515.0000 h 742.5473 v -515.0000 Z"/></clipPath></defs><g clip-path="url(#myClip1)"><path d="M 40.0420,544.5925 l 2.8560,-0.7725 l 2.8560,2.0600 l 2.8560,0.7725 l 2.8560,-1.2875 h 2.8560 l 2.8560,2.0600 l 2.8560,-0.2575 h 2.8560 l 2.8560,0.2575 l 2.8560,-1.5450 l 2.8560,3.0900 l 2.8560,-0.7725 l 2.8560,-0.2575 l 2.8560,-1.8025 l 2.8560,1.2875 l 2.8560,-0.7725 l 2.8560,0.2575 l 2.8560,-0.2575 l 2.8560,-0.5150 l 2.8560,0.7725 l 2.8560,-2.8325 l 2.8560,-1.2875 l 2.8560,-0.7725 l 2.8560,-6.9525 l 2.8560,-3.3475 l 2.8560,-4.8925 l 2.8560,-10.0425 l 2.8560,-21.6300 l 2.8560,-17.2525 l 2.8560,-17.2525 l 2.8560,-22.1450 l 2.8560,-44.5475 l 2.8560,1.2875 l 2.8560,12.3600 l 2.8560,43.2600 l 2.8560,6.9525 l 2.8560,19.5700 l 2.8560,4.8925 l 2.8560,8.2400 l 2.8560,9.0125 l 2.8560,2.5750 l 2.8560,-6.4375 l 2.8560,5.6650 l 2.8560,-1.2875 l 2.8560,-13.9050 l 2.8560,-4.6350 l 2.8560,-1.0300 l 2.8560,-11.3300 l 2.8560,-1.0300 l 2.8560,-3.3475 l 2.8560,-8.4975 l 2.8560,-20.0850 l 2.8560,-6.6950 l 2.8560,-19.5700 l 2.8560,-2.5750 l 2.8560,-20.6000 l 2.8560,-22.6600 l 2.8560,-19.3125 l 2.8560,-35.5350 l 2.8560,-3.6050 l 2.8560,-8.4975 l 2.8560,-20.8575 l 2.8560,-49.4400 l 2.8560,-54.8475 l 2.8560,-22.4025 l 2.8560,22.1450 l 2.8560,38.1100 l 2.8560,21.6300 l 2.8560,29.6125 l 2.8560,44.8050 l 2.8560,-6.9525 l 2.8560,-12.8750 l 2.8560,1.5450 l 2.8560,10.8150 l 2.8560,6.9525 l 2.8560,-12.3600 l 2.8560,19.8275 l 2.8560,10.0425 l 2.8560,-3.8625 l 2.8560,18.2825 l 2.8560,-0.2575 l 2.8560,9.0125 l 2.8560,-10.8150 l 2.8560,8.4975 l 2.8560,-1.5450 l 2.8560,21.3725 l 2.8560,-1.5450 l 2.8560,6.6950 l 2.8560,7.4675 l 2.8560,3.8625 l 2.8560,16.4800 l 2.8560,-11.0725 l 2.8560,20.0850 l 2.8560,4.6350 l 2.8560,-5.4075 l 2.8560,1.8025 l 2.8560,23.4325 l 2.8560,-8.2400 l 2.8560,5.1500 l 2.8560,18.5400 l 2.8560,-8.7550 l 2.8560,13.1325 l 2.8560,5.1500 l 2.8560,10.5575 l 2.8560,-2.0600 l 2.8560,1.5450 l 2.8560,17.7675 h 2.8560 l 2.8560,11.0725 l 2.8560,-4.3775 l 2.8560,6.6950 l 2.8560,10.3000 l 2.8560,-10.5575 l 2.8560,11.3300 l 2.8560,-2.0600 l 2.8560,12.8750 l 2.8560,-8.4975 l 2.8560,0.7725 l 2.8560,1.8025 l 2.8560,1.5450 l 2.8560,-5.1500 l 2.8560,5.4075 l 2.8560,-3.0900 l 2.8560,4.3775 l 2.8560,-2.5750 l 2.8560,8.4975 l 2.8560,0.5150 h 2.8560 l 2.8560,2.8325 l 2.8560,-4.3775 l 2.8560,-0.5150 l 2.8560,2.3175 l 2.8560,-2.8325 l 2.8560,8.4975 l 2.8560,-6.4375 l 2.8560,3.8625 l 2.8560,-2.3175 l 2.8560,-0.2575 l 2.8560,3.8625 h 2.8560 l 2.8560,2.8325 l 2.8560,-0.7725 l 2.8560,-3.6050 l 2.8560,0.5150 l 2.8560,3.6050 l 2.8560,-2.5750 l 2.8560,-3.3475 l 2.8560,4.6350 l 2.8560,-7.4675 l 2.8560,6.6950 l 2.8560,-0.2575 l 2.8560,0.2575 l 2.8560,-1.0300 l 2.8560,4.6350 l 2.8560,-2.8325 l 2.8560,-0.5150 l 2.8560,-1.2875 h 2.8560 l 2.8560,4.1200 l 2.8560,-5.6650 l 2.8560,3.6050 l 2.8560,0.5150 l 2.8560,4.1200 l 2.8560,-4.1200 l 2.8560,-1.0300 l 2.8560,4.6350 l 2.8560,-0.5150 l 2.8560,-0.7725 l 2.8560,1.5450 l 2.8560,-0.5150 l 2.8560,-3.3475 l 2.8560,6.9525 l 2.8560,-1.0300 l 2.8560,-0.2575 l 2.8560,-1.2875 l 2.8560,2.5750 l 2.8560,-4.8925 l 2.8560,3.6050 l 2.8560,-0.2575 l 2.8560,-5.1500 l 2.8560,4.6350 l 2.8560,-4.6350 l 2.8560,-1.0300 l 2.8560,0.2575 l 2.8560,3.3475 l 2.8560,-5.4075 l 2.8560,2.0600 l 2.8560,-0.5150 l 2.8560,0.5150 l 2.8560,-3.0900 l 2.8560,1.2875 l 2.8560,-3.6050 l 2.8560,2.3175 l 2.8560,0.5150 l 2.8560,-2.3175 l 2.8560,0.7725 l 2.8560,-1.0300 l 2.8560,3.6050 l 2.8560,-0.2575 l 2.8560,-4.3775 l 2.8560,-0.5150 l 2.8560,6.9525 l 2.8560,0.5150 l 2.8560,-5.9225 l 2.8560,4.3775 l 2.8560,2.3175 l 2.8560,-3.6050 l 2.8560,4.3775 l 2.8560,0.2575 l 2.8560,-0.2575 l 2.8560,-4.6350 l 2.8560,5.9225 l 2.8560,-0.7725 l 2.8560,0.2575 l 2.8560,5.9225 l 2.8560,-4.8925 l 2.8560,2.0600 l 2.8560,-0.2575 l 2.8560,-5.1500 l 2.8560,4.3775 l 2.8560,2.8325 l 2.8560,-1.2875 l 2.8560,3.8625 l 2.8560,-1.8025 l 2.8560,1.8025 h 2.8560 l 2.8560,0.2575 l 2.8560,1.0300 l 2.8560,-2.8325 l 2.8560,2.8325 l 2.8560,-3.0900 l 2.8560,1.5450 l 2.8560,0.2575 l 2.8560,1.0300 l 2.8560,-0.5150 l 2.8560,-0.5150 l 2.8560,-1.8025 l 2.8560,2.8325 l 2.8560,5.9225 l 2.8560,0.7725 l 2.8560,-0.7725 l 2.8560,1.8025 l 2.8560,-0.2575 h 2.8560 l 2.8560,1.0300 l 2.8560,-1.2875 l 2.8560,1.0300 h 2.8560 l 2.8560,-0.2575 l 2.8560,1.8025 l 2.8560,-1.0300 h 2.8560 l 2.8560,0.7725 l 2.8560,-0.2575 l 2.8560,-2.5750 "/></g></g><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,128,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><defs><clipPath id="myClip2"><path d="M 40.0420,35.0000 v 515.0000 h 742.5473 v -515.0000 Z"/></clipPath></defs><g clip-path="url(#myClip2)"><path d="M 40.0420,550.0000 h 2.8560 h 2.8560 h 2.8560 h 2.8560 h 2.8560 h 2.8560 h 2.8560 h 2.8560 h 2.8560 h 2.8560 l 2.8560,-0.2575 l 2.8560,0.2575 h 2.8560 l 2.8560,-0.2575 l 2.8560,0.2575 l 2.8560,-0.2575 h 2.8560 l 2.8560,-0.5150 l 2.8560,-0.2575 h 2.8560 l 2.8560,-0.5150 l 2.8560,-1.0300 l 2.8560,-0.2575 l 2.8560,-1.2875 l 2.8560,-4.1200 l 2.8560,-3.6050 l 2.8560,-6.4375 l 2.8560,-8.7550 l 2.8560,-9.2700 l 2.8560,-7.9825 l 2.8560,-10.8150 l 2.8560,-1.5450 l 2.8560,-21.6300 l 2.8560,-37.5950 l 2.8560,-38.3675 l 2.8560,8.2400 l 2.8560,22.6600 l 2.8560,20.6000 l 2.8560,12.6175 l 2.8560,-1.8025 l 2.8560,7.9825 l 2.8560,4.1200 l 2.8560,13.1325 l 2.8560,-5.9225 l 2.8560,4.3775 l 2.8560,1.2875 l 2.8560,-4.8925 l 2.8560,8.2400 l 2.8560,0.5150 l 2.8560,-7.4675 l 2.8560,3.0900 l 2.8560,-1.0300 l 2.8560,7.9825 l 2.8560,-0.2575 l 2.8560,5.9225 l 2.8560,8.7550 l 2.8560,-7.2100 l 2.8560,-6.1800 l 2.8560,-2.0600 l 2.8560,-1.8025 l 2.8560,-7.2100 l 2.8560,1.2875 l 2.8560,-8.4975 l 2.8560,5.1500 l 2.8560,1.2875 l 2.8560,-1.5450 l 2.8560,1.2875 l 2.8560,-1.8025 l 2.8560,3.0900 l 2.8560,-5.4075 l 2.8560,1.0300 l 2.8560,7.9825 l 2.8560,-5.6650 l 2.8560,-6.1800 l 2.8560,3.0900 l 2.8560,12.8750 l 2.8560,2.5750 l 2.8560,-4.3775 l 2.8560,3.6050 l 2.8560,-6.6950 l 2.8560,6.4375 l 2.8560,-5.9225 l 2.8560,7.4675 l 2.8560,3.3475 l 2.8560,-14.1625 l 2.8560,13.6475 l 2.8560,-1.0300 l 2.8560,-0.7725 l 2.8560,-5.1500 l 2.8560,-0.2575 l 2.8560,-12.8750 l 2.8560,-10.5575 l 2.8560,-21.8875 l 2.8560,-1.5450 l 2.8560,-16.9950 l 2.8560,-18.7975 l 2.8560,-4.6350 l 2.8560,-25.4925 l 2.8560,-26.0075 l 2.8560,-29.8700 l 2.8560,-40.9425 l 2.8560,-14.4200 l 2.8560,-0.2575 l 2.8560,7.7250 l 2.8560,11.8450 l 2.8560,46.6075 l 2.8560,7.4675 l 2.8560,17.5100 l 2.8560,-0.7725 l 2.8560,-16.7375 l 2.8560,-12.1025 l 2.8560,-3.6050 l 2.8560,14.4200 l 2.8560,-29.0975 l 2.8560,-3.8625 l 2.8560,2.0600 l 2.8560,12.3600 l 2.8560,-14.4200 l 2.8560,7.7250 l 2.8560,11.5875 l 2.8560,18.7975 l 2.8560,4.3775 l 2.8560,-7.2100 l 2.8560,5.6650 l 2.8560,16.2225 l 2.8560,-9.5275 l 2.8560,-3.8625 l 2.8560,11.5875 h 2.8560 l 2.8560,4.3775 l 2.8560,15.9650 l 2.8560,3.8625 l 2.8560,21.6300 l 2.8560,19.8275 l 2.8560,-0.2575 l 2.8560,14.1625 l 2.8560,13.9050 l 2.8560,7.9825 l 2.8560,16.7375 l 2.8560,-3.6050 l 2.8560,13.3900 l 2.8560,4.1200 l 2.8560,9.5275 l 2.8560,-2.8325 l 2.8560,7.7250 l 2.8560,3.8625 l 2.8560,-0.7725 l 2.8560,4.6350 l 2.8560,0.5150 l 2.8560,1.0300 l 2.8560,-3.3475 l 2.8560,2.3175 l 2.8560,6.6950 l 2.8560,-5.6650 l 2.8560,4.8925 l 2.8560,-4.1200 h 2.8560 l 2.8560,3.0900 l 2.8560,-2.8325 l 2.8560,7.4675 l 2.8560,0.5150 l 2.8560,-0.2575 l 2.8560,2.0600 l 2.8560,3.0900 l 2.8560,-3.0900 l 2.8560,0.5150 l 2.8560,-0.7725 l 2.8560,-1.2875 l 2.8560,2.8325 l 2.8560,-1.0300 l 2.8560,6.4375 l 2.8560,-6.6950 l 2.8560,1.0300 l 2.8560,-1.8025 h 2.8560 l 2.8560,1.8025 l 2.8560,-0.2575 l 2.8560,-4.3775 l 2.8560,9.5275 l 2.8560,-0.5150 l 2.8560,-2.5750 l 2.8560,-0.5150 l 2.8560,3.6050 l 2.8560,-1.2875 l 2.8560,3.8625 l 2.8560,2.3175 l 2.8560,-2.0600 l 2.8560,0.7725 l 2.8560,2.0600 l 2.8560,-0.2575 l 2.8560,-1.2875 l 2.8560,3.3475 l 2.8560,-1.5450 l 2.8560,-2.3175 l 2.8560,1.2875 l 2.8560,-0.7725 l 2.8560,1.8025 l 2.8560,2.0600 l 2.8560,-5.9225 l 2.8560,5.9225 l 2.8560,-0.5150 l 2.8560,-0.5150 l 2.8560,-4.6350 l 2.8560,3.0900 l 2.8560,-2.0600 l 2.8560,-0.2575 l 2.8560,-0.5150 l 2.8560,3.0900 l 2.8560,-1.2875 l 2.8560,-4.8925 l 2.8560,1.2875 l 2.8560,-3.6050 l 2.8560,3.0900 l 2.8560,-3.6050 l 2.8560,2.3175 l 2.8560,0.5150 l 2.8560,-1.0300 l 2.8560,-0.7725 l 2.8560,-2.0600 l 2.8560,2.0600 l 2.8560,2.0600 l 2.8560,-2.8325 l 2.8560,4.6350 l 2.8560,-2.5750 l 2.8560,-0.5150 l 2.8560,0.5150 l 2.8560,0.5150 l 2.8560,6.6950 l 2.8560,-4.3775 l 2.8560,2.5750 l 2.8560,1.8025 l 2.8560,0.5150 l 2.8560,1.0300 l 2.8560,1.2875 l 2.8560,1.8025 l 2.8560,-2.3175 l 2.8560,1.2875 l 2.8560,2.5750 l 2.8560,-0.5150 h 2.8560 h 2.8560 l 2.8560,-1.5450 l 2.8560,0.2575 l 2.8560,-6.4375 l 2.8560,-0.7725 l 2.8560,1.2875 l 2.8560,2.5750 l 2.8560,3.6050 l 2.8560,5.4075 l 2.8560,1.0300 l 2.8560,1.8025 l 2.8560,0.7725 l 2.8560,-0.2575 l 2.8560,1.0300 l 2.8560,-0.7725 "/></g></g><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,255)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><defs><clipPath id="myClip3"><path d="M 40.0420,35.0000 v 515.0000 h 742.5473 v -515.0000 Z"/></clipPath></defs><g clip-path="url(#myClip3)"><path d="M 40.0420,51.7375 l 2.8560,95.7900 l 2.8560,18.7975 l 2.8560,81.1125 l 2.8560,70.0400 l 2.8560,24.2050 l 2.8560,19.3125 l 2.8560,34.5050 l 2.8560,-8.2400 l 2.8560,-1.5450 l 2.8560,-33.7325 l 2.8560,-2.8325 l 2.8560,-44.8050 l 2.8560,-27.2950 l 2.8560,-19.0550 l 2.8560,31.9300 l 2.8560,31.9300 l 2.8560,33.7325 l 2.8560,-9.2700 l 2.8560,16.2225 l 2.8560,-20.0850 l 2.8560,2.8325 l 2.8560,21.8875 l 2.8560,-13.3900 l 2.8560,-4.8925 l 2.8560,8.7550 l 2.8560,5.1500 l 2.8560,-10.0425 l 2.8560,-4.8925 l 2.8560,1.8025 l 2.8560,-2.0600 l 2.8560,8.4975 l 2.8560,-18.0250 l 2.8560,1.2875 l 2.8560,-0.2575 l 2.8560,-12.6175 l 2.8560,2.5750 l 2.8560,-19.0550 l 2.8560,-0.2575 l 2.8560,8.2400 l 2.8560,8.2400 l 2.8560,3.0900 l 2.8560,28.3250 l 2.8560,-26.0075 l 2.8560,21.8875 l 2.8560,-14.6775 l 2.8560,2.8325 l 2.8560,5.6650 l 2.8560,6.9525 l 2.8560,14.6775 l 2.8560,4.3775 l 2.8560,13.6475 l 2.8560,-2.3175 l 2.8560,14.1625 l 2.8560,-9.0125 l 2.8560,-15.9650 l 2.8560,2.5750 l 2.8560,10.8150 l 2.8560,11.3300 l 2.8560,-2.5750 l 2.8560,-4.6350 l 2.8560,9.5275 l 2.8560,6.6950 l 2.8560,4.8925 l 2.8560,-0.2575 l 2.8560,2.8325 l 2.8560,6.6950 l 2.8560,3.0900 l 2.8560,7.9825 l 2.8560,6.9525 l 2.8560,15.9650 l 2.8560,-7.2100 l 2.8560,14.4200 l 2.8560,2.8325 l 2.8560,7.2100 l 2.8560,-0.7725 l 2.8560,-2.5750 l 2.8560,10.5575 l 2.8560,5.1500 l 2.8560,-2.3175 l 2.8560,6.1800 l 2.8560,3.3475 l 2.8560,2.8325 l 2.8560,10.5575 l 2.8560,-2.3175 l 2.8560,6.1800 l 2.8560,0.2575 l 2.8560,4.1200 l 2.8560,-4.1200 l 2.8560,-0.7725 l 2.8560,7.7250 l 2.8560,-3.6050 l 2.8560,10.8150 l 2.8560,-3.3475 l 2.8560,-0.2575 l 2.8560,2.3175 l 2.8560,-0.7725 l 2.8560,-0.2575 l 2.8560,2.3175 l 2.8560,3.0900 l 2.8560,-2.0600 l 2.8560,2.0600 l 2.8560,6.6950 l 2.8560,-3.3475 l 2.8560,1.2875 l 2.8560,2.8325 l 2.8560,-1.0300 l 2.8560,-0.5150 l 2.8560,-0.7725 l 2.8560,3.8625 l 2.8560,0.2575 l 2.8560,1.0300 l 2.8560,-1.8025 l 2.8560,1.0300 l 2.8560,3.6050 l 2.8560,-2.0600 l 2.8560,-1.8025 l 2.8560,2.0600 l 2.8560,3.8625 l 2.8560,-3.0900 l 2.8560,3.0900 l 2.8560,-2.3175 l 2.8560,-1.5450 l 2.8560,0.7725 l 2.8560,0.2575 l 2.8560,3.8625 l 2.8560,-2.3175 l 2.8560,-1.2875 l 2.8560,5.6650 l 2.8560,-1.2875 l 2.8560,-0.5150 l 2.8560,-2.8325 l 2.8560,2.0600 h 2.8560 l 2.8560,-0.2575 l 2.8560,1.8025 l 2.8560,-0.7725 l 2.8560,1.5450 l 2.8560,-1.2875 l 2.8560,2.0600 l 2.8560,-1.8025 l 2.8560,0.5150 l 2.8560,1.0300 l 2.8560,-1.2875 l 2.8560,-0.5150 l 2.8560,2.0600 l 2.8560,-0.2575 l 2.8560,-1.5450 l 2.8560,0.2575 l 2.8560,0.7725 h 2.8560 l 2.8560,0.5150 l 2.8560,-1.5450 l 2.8560,1.5450 h 2.8560 l 2.8560,0.5150 l 2.8560,-2.5750 l 2.8560,1.8025 l 2.8560,1.5450 l 2.8560,-2.3175 l 2.8560,3.0900 l 2.8560,-3.3475 h 2.8560 l 2.8560,2.8325 l 2.8560,-2.0600 l 2.8560,1.8025 l 2.8560,-1.5450 l 2.8560,1.8025 l 2.8560,-1.0300 l 2.8560,-0.2575 l 2.8560,0.7725 l 2.8560,-1.2875 l 2.8560,2.8325 l 2.8560,-1.2875 l 2.8560,0.7725 l 2.8560,-1.2875 h 2.8560 l 2.8560,-0.2575 l 2.8560,0.7725 l 2.8560,-0.7725 l 2.8560,1.8025 l 2.8560,-1.8025 l 2.8560,0.7725 l 2.8560,0.2575 l 2.8560,-0.7725 l 2.8560,0.7725 l 2.8560,-0.7725 l 2.8560,1.5450 l 2.8560,0.5150 l 2.8560,-2.3175 l 2.8560,1.8025 l 2.8560,0.5150 l 2.8560,-0.5150 l 2.8560,-1.5450 l 2.8560,1.5450 h 2.8560 l 2.8560,-1.0300 l 2.8560,0.5150 l 2.8560,-1.5450 l 2.8560,0.7725 l 2.8560,0.5150 l 2.8560,0.5150 l 2.8560,0.2575 l 2.8560,-1.0300 l 2.8560,1.8025 l 2.8560,-2.3175 l 2.8560,1.0300 l 2.8560,0.5150 l 2.8560,-1.0300 l 2.8560,1.0300 l 2.8560,-1.2875 l 2.8560,1.8025 l 2.8560,-1.0300 l 2.8560,-1.5450 l 2.8560,0.2575 l 2.8560,1.0300 l 2.8560,-0.2575 l 2.8560,1.2875 h 2.8560 l 2.8560,-1.5450 h 2.8560 l 2.8560,1.0300 l 2.8560,-0.2575 l 2.8560,-0.2575 l 2.8560,-0.2575 l 2.8560,0.2575 l 2.8560,0.5150 h 2.8560 l 2.8560,-0.5150 l 2.8560,0.5150 l 2.8560,-0.7725 l 2.8560,1.5450 l 2.8560,-0.7725 l 2.8560,-0.7725 l 2.8560,0.2575 l 2.8560,2.3175 l 2.8560,-1.5450 l 2.8560,-0.5150 l 2.8560,0.7725 h 2.8560 h 2.8560 l 2.8560,-0.5150 l 2.8560,0.7725 h 2.8560 l 2.8560,-1.0300 l 2.8560,0.7725 h 2.8560 l 2.8560,0.7725 l 2.8560,-0.7725 l 2.8560,0.5150 l 2.8560,0.2575 l 2.8560,0.5150 l 2.8560,-0.2575 l 2.8560,0.5150 l 2.8560,-0.2575 l 2.8560,-0.7725 "/></g></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="square" stroke-miterlimit="10.0"><path d="M 40.0420,550.0000 v -515.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 40.0420,550.0000 h 2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 40.0420,498.5000 h 2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 40.0420,447.0000 h 2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 40.0420,395.5000 h 2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 40.0420,344.0000 h 2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 40.0420,292.5000 h 2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 40.0420,241.0000 h 2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 40.0420,189.5000 h 2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 40.0420,138.0000 h 2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 40.0420,86.5000 h 2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 40.0420,35.0000 h 2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 40.0420,550.0000 h 5.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 40.0420,421.2500 h 5.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 40.0420,292.5000 h 5.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 40.0420,163.7500 h 5.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 40.0420,35.0000 h 5.0000 "/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 25.7458,553.4454 ZM 28.3613,553.5714 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 28.3613,553.5714 ZM 28.3613,552.8782 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670Z"/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 15.1050,424.6954 ZM 15.7878,423.3403 c 0.2941,0.3046 0.6985,0.5357 0.6985 0.5357c 0.4044,0.2311 0.9926,0.2311 0.9926 0.2311c 0.3046,0.0000 0.5725,-0.1103 0.5725 -0.1103c 0.2679,-0.1103 0.4674,-0.3099 0.4674 -0.3099c 0.1996,-0.1996 0.3151,-0.4832 0.3151 -0.4832c 0.1155,-0.2836 0.1155,-0.6303 0.1155 -0.6303c 0.0000,-0.6933 -0.3887,-1.0819 -0.3887 -1.0819c -0.3887,-0.3887 -1.0399,-0.3887 -1.0399 -0.3887c -0.3466,-0.0000 -0.5935,0.1050 -0.5935 0.1050c -0.2468,0.1050 -0.5515,0.3046 -0.5515 0.3046l -0.4622,-0.2941 l 0.2206,-3.2248 h 3.3508 v 0.7458 h -2.5945 l -0.1786,1.9853 c 0.2416,-0.1261 0.4832,-0.1996 0.4832 -0.1996c 0.2416,-0.0735 0.5462,-0.0735 0.5462 -0.0735c 0.4307,0.0000 0.8088,0.1261 0.8088 0.1261c 0.3782,0.1261 0.6618,0.3834 0.6618 0.3834c 0.2836,0.2574 0.4464,0.6513 0.4464 0.6513c 0.1628,0.3939 0.1628,0.9401 0.1628 0.9401c 0.0000,0.5462 -0.1891,0.9664 -0.1891 0.9664c -0.1891,0.4202 -0.5042,0.7090 -0.5042 0.7090c -0.3151,0.2889 -0.7195,0.4412 -0.7195 0.4412c -0.4044,0.1523 -0.8456,0.1523 -0.8456 0.1523c -0.3992,-0.0000 -0.7300,-0.0788 -0.7300 -0.0788c -0.3309,-0.0788 -0.5987,-0.2048 -0.5987 -0.2048c -0.2679,-0.1261 -0.4832,-0.2889 -0.4832 -0.2889c -0.2153,-0.1628 -0.3834,-0.3414 -0.3834 -0.3414ZM 20.3256,424.6954 ZM 22.9412,424.8214 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 22.9412,424.8214 ZM 22.9412,424.1282 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670ZM 25.5462,424.6954 ZM 28.1618,424.8214 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 28.1618,424.8214 ZM 28.1618,424.1282 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670Z"/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 10.4517,295.9454 ZM 11.2815,295.2311 h 1.5336 v -4.9370 h -1.2185 v -0.5567 c 0.4622,-0.0840 0.8036,-0.2048 0.8036 -0.2048c 0.3414,-0.1208 0.6145,-0.2889 0.6145 -0.2889h 0.6618 v 5.9874 h 1.3866 v 0.7143 h -3.7815 v -0.7143 ZM 15.6723,295.9454 ZM 18.2878,296.0714 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 18.2878,296.0714 ZM 18.2878,295.3782 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670ZM 20.8929,295.9454 ZM 23.5084,296.0714 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 23.5084,296.0714 ZM 23.5084,295.3782 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670ZM 26.1134,295.9454 ZM 28.7290,296.0714 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 28.7290,296.0714 ZM 28.7290,295.3782 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670Z"/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 10.4517,167.1954 ZM 11.2815,166.4811 h 1.5336 v -4.9370 h -1.2185 v -0.5567 c 0.4622,-0.0840 0.8036,-0.2048 0.8036 -0.2048c 0.3414,-0.1208 0.6145,-0.2889 0.6145 -0.2889h 0.6618 v 5.9874 h 1.3866 v 0.7143 h -3.7815 v -0.7143 ZM 15.6723,167.1954 ZM 16.3550,165.8403 c 0.2941,0.3046 0.6985,0.5357 0.6985 0.5357c 0.4044,0.2311 0.9926,0.2311 0.9926 0.2311c 0.3046,0.0000 0.5725,-0.1103 0.5725 -0.1103c 0.2679,-0.1103 0.4674,-0.3099 0.4674 -0.3099c 0.1996,-0.1996 0.3151,-0.4832 0.3151 -0.4832c 0.1155,-0.2836 0.1155,-0.6303 0.1155 -0.6303c 0.0000,-0.6933 -0.3887,-1.0819 -0.3887 -1.0819c -0.3887,-0.3887 -1.0399,-0.3887 -1.0399 -0.3887c -0.3466,-0.0000 -0.5935,0.1050 -0.5935 0.1050c -0.2468,0.1050 -0.5515,0.3046 -0.5515 0.3046l -0.4622,-0.2941 l 0.2206,-3.2248 h 3.3508 v 0.7458 h -2.5945 l -0.1786,1.9853 c 0.2416,-0.1261 0.4832,-0.1996 0.4832 -0.1996c 0.2416,-0.0735 0.5462,-0.0735 0.5462 -0.0735c 0.4307,0.0000 0.8088,0.1261 0.8088 0.1261c 0.3782,0.1261 0.6618,0.3834 0.6618 0.3834c 0.2836,0.2574 0.4464,0.6513 0.4464 0.6513c 0.1628,0.3939 0.1628,0.9401 0.1628 0.9401c 0.0000,0.5462 -0.1891,0.9664 -0.1891 0.9664c -0.1891,0.4202 -0.5042,0.7090 -0.5042 0.7090c -0.3151,0.2889 -0.7195,0.4412 -0.7195 0.4412c -0.4044,0.1523 -0.8456,0.1523 -0.8456 0.1523c -0.3992,-0.0000 -0.7300,-0.0788 -0.7300 -0.0788c -0.3309,-0.0788 -0.5987,-0.2048 -0.5987 -0.2048c -0.2679,-0.1261 -0.4832,-0.2889 -0.4832 -0.2889c -0.2153,-0.1628 -0.3834,-0.3414 -0.3834 -0.3414ZM 20.8929,167.1954 ZM 23.5084,167.3214 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 23.5084,167.3214 ZM 23.5084,166.6282 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670ZM 26.1134,167.1954 ZM 28.7290,167.3214 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 28.7290,167.3214 ZM 28.7290,166.6282 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670Z"/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 10.0000,38.4454 ZM 10.4202,37.9307 c 0.7563,-0.7563 1.3445,-1.3655 1.3445 -1.3655c 0.5882,-0.6092 0.9874,-1.1292 0.9874 -1.1292c 0.3992,-0.5200 0.6092,-0.9559 0.6092 -0.9559c 0.2101,-0.4359 0.2101,-0.8456 0.2101 -0.8456c 0.0000,-0.5777 -0.3151,-0.9454 -0.3151 -0.9454c -0.3151,-0.3676 -0.9559,-0.3676 -0.9559 -0.3676c -0.4202,-0.0000 -0.7773,0.2363 -0.7773 0.2363c -0.3571,0.2363 -0.6513,0.5725 -0.6513 0.5725l -0.4937,-0.4937 c 0.4202,-0.4622 0.8929,-0.7405 0.8929 -0.7405c 0.4727,-0.2784 1.1345,-0.2784 1.1345 -0.2784c 0.9349,0.0000 1.4706,0.5410 1.4706 0.5410c 0.5357,0.5410 0.5357,1.4338 0.5357 1.4338c 0.0000,0.4727 -0.2048,0.9506 -0.2048 0.9506c -0.2048,0.4779 -0.5672,0.9874 -0.5672 0.9874c -0.3624,0.5095 -0.8613,1.0609 -0.8613 1.0609c -0.4989,0.5515 -1.0977,1.1712 -1.0977 1.1712c 0.2731,-0.0210 0.5672,-0.0420 0.5672 -0.0420c 0.2941,-0.0210 0.5567,-0.0210 0.5567 -0.0210h 1.9433 v 0.7458 h -4.3277 v -0.5147 ZM 15.2206,38.4454 ZM 17.8361,38.5714 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 17.8361,38.5714 ZM 17.8361,37.8782 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670ZM 20.4412,38.4454 ZM 23.0567,38.5714 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 23.0567,38.5714 ZM 23.0567,37.8782 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670ZM 25.6618,38.4454 ZM 28.2773,38.5714 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 28.2773,38.5714 ZM 28.2773,37.8782 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670Z"/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="square" stroke-miterlimit="10.0"><path d="M 40.0420,550.0000 h 742.5473 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 40.0420,550.0000 v -2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 97.1610,550.0000 v -2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 154.2801,550.0000 v -2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 211.3991,550.0000 v -2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 268.5181,550.0000 v -2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 325.6371,550.0000 v -2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 382.7561,550.0000 v -2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 439.8752,550.0000 v -2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 496.9942,550.0000 v -2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 554.1132,550.0000 v -2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 611.2322,550.0000 v -2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 668.3512,550.0000 v -2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 725.4703,550.0000 v -2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 782.5893,550.0000 v -2.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 40.0420,550.0000 v -5.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 97.1610,550.0000 v -5.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 154.2801,550.0000 v -5.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 211.3991,550.0000 v -5.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 268.5181,550.0000 v -5.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 325.6371,550.0000 v -5.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 382.7561,550.0000 v -5.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 439.8752,550.0000 v -5.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 496.9942,550.0000 v -5.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 554.1132,550.0000 v -5.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 611.2322,550.0000 v -5.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 668.3512,550.0000 v -5.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 725.4703,550.0000 v -5.0000 "/></g><g stroke-linejoin="miter" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 782.5893,550.0000 v -5.0000 "/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 37.8939,570.0000 ZM 40.5095,570.1261 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 40.5095,570.1261 ZM 40.5095,569.4328 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670Z"/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 92.3606,570.0000 ZM 92.7808,569.4853 c 0.7563,-0.7563 1.3445,-1.3655 1.3445 -1.3655c 0.5882,-0.6092 0.9874,-1.1292 0.9874 -1.1292c 0.3992,-0.5200 0.6092,-0.9559 0.6092 -0.9559c 0.2101,-0.4359 0.2101,-0.8456 0.2101 -0.8456c 0.0000,-0.5777 -0.3151,-0.9454 -0.3151 -0.9454c -0.3151,-0.3676 -0.9559,-0.3676 -0.9559 -0.3676c -0.4202,-0.0000 -0.7773,0.2363 -0.7773 0.2363c -0.3571,0.2363 -0.6513,0.5725 -0.6513 0.5725l -0.4937,-0.4937 c 0.4202,-0.4622 0.8929,-0.7405 0.8929 -0.7405c 0.4727,-0.2784 1.1345,-0.2784 1.1345 -0.2784c 0.9349,0.0000 1.4706,0.5410 1.4706 0.5410c 0.5357,0.5410 0.5357,1.4338 0.5357 1.4338c 0.0000,0.4727 -0.2048,0.9506 -0.2048 0.9506c -0.2048,0.4779 -0.5672,0.9874 -0.5672 0.9874c -0.3624,0.5095 -0.8613,1.0609 -0.8613 1.0609c -0.4989,0.5515 -1.0977,1.1712 -1.0977 1.1712c 0.2731,-0.0210 0.5672,-0.0420 0.5672 -0.0420c 0.2941,-0.0210 0.5567,-0.0210 0.5567 -0.0210h 1.9433 v 0.7458 h -4.3277 v -0.5147 ZM 97.5812,570.0000 ZM 100.1968,570.1261 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 100.1968,570.1261 ZM 100.1968,569.4328 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670Z"/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 149.3798,570.0000 ZM 152.5731,567.4580 v -1.9433 c 0.0000,-0.2731 0.0158,-0.6460 0.0158 -0.6460c 0.0158,-0.3729 0.0368,-0.6460 0.0368 -0.6460h -0.0420 c -0.1261,0.2416 -0.2626,0.4727 -0.2626 0.4727c -0.1366,0.2311 -0.2836,0.4727 -0.2836 0.4727l -1.5651,2.2899 h 2.1008 ZM 152.5731,567.4580 ZM 154.3063,568.1513 h -0.9139 v 1.8487 h -0.8193 v -1.8487 h -3.0147 v -0.5672 l 2.8676,-4.2857 h 0.9664 v 4.1597 h 0.9139 v 0.6933 ZM 154.6004,570.0000 ZM 157.2160,570.1261 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 157.2160,570.1261 ZM 157.2160,569.4328 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670Z"/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 206.6617,570.0000 ZM 209.4768,569.4433 c 0.2521,0.0000 0.4622,-0.1050 0.4622 -0.1050c 0.2101,-0.1050 0.3676,-0.2994 0.3676 -0.2994c 0.1576,-0.1943 0.2468,-0.4622 0.2468 -0.4622c 0.0893,-0.2679 0.0893,-0.6040 0.0893 -0.6040c 0.0000,-0.6618 -0.3046,-1.0399 -0.3046 -1.0399c -0.3046,-0.3782 -0.9349,-0.3782 -0.9349 -0.3782c -0.3151,-0.0000 -0.6880,0.2048 -0.6880 0.2048c -0.3729,0.2048 -0.7090,0.6775 -0.7090 0.6775c 0.0840,0.9874 0.4569,1.4968 0.4569 1.4968c 0.3729,0.5095 1.0137,0.5095 1.0137 0.5095ZM 209.4768,569.4433 ZM 210.8529,564.4223 c -0.2101,-0.2416 -0.4989,-0.3834 -0.4989 -0.3834c -0.2889,-0.1418 -0.6040,-0.1418 -0.6040 -0.1418c -0.3466,-0.0000 -0.6618,0.1471 -0.6618 0.1471c -0.3151,0.1471 -0.5567,0.4832 -0.5567 0.4832c -0.2416,0.3361 -0.3887,0.8771 -0.3887 0.8771c -0.1471,0.5410 -0.1576,1.3393 -0.1576 1.3393c 0.3151,-0.3887 0.7353,-0.6145 0.7353 -0.6145c 0.4202,-0.2258 0.8298,-0.2258 0.8298 -0.2258c 0.8718,0.0000 1.3918,0.5147 1.3918 0.5147c 0.5200,0.5147 0.5200,1.5546 0.5200 1.5546c 0.0000,0.4832 -0.1576,0.8771 -0.1576 0.8771c -0.1576,0.3939 -0.4307,0.6775 -0.4307 0.6775c -0.2731,0.2836 -0.6303,0.4412 -0.6303 0.4412c -0.3571,0.1576 -0.7668,0.1576 -0.7668 0.1576c -0.4937,-0.0000 -0.9139,-0.1996 -0.9139 -0.1996c -0.4202,-0.1996 -0.7300,-0.6040 -0.7300 -0.6040c -0.3099,-0.4044 -0.4884,-1.0084 -0.4884 -1.0084c -0.1786,-0.6040 -0.1786,-1.4128 -0.1786 -1.4128c 0.0000,-1.0084 0.2101,-1.7174 0.2101 -1.7174c 0.2101,-0.7090 0.5672,-1.1555 0.5672 -1.1555c 0.3571,-0.4464 0.8141,-0.6513 0.8141 -0.6513c 0.4569,-0.2048 0.9611,-0.2048 0.9611 -0.2048c 0.5462,0.0000 0.9401,0.2048 0.9401 0.2048c 0.3939,0.2048 0.6775,0.5095 0.6775 0.5095ZM 211.8823,570.0000 ZM 214.4978,570.1261 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 214.4978,570.1261 ZM 214.4978,569.4328 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670Z"/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 263.7439,570.0000 ZM 264.9519,568.2038 c 0.0000,0.2836 0.1103,0.5147 0.1103 0.5147c 0.1103,0.2311 0.3046,0.4044 0.3046 0.4044c 0.1943,0.1733 0.4569,0.2679 0.4569 0.2679c 0.2626,0.0945 0.5672,0.0945 0.5672 0.0945c 0.5882,0.0000 0.9506,-0.3256 0.9506 -0.3256c 0.3624,-0.3256 0.3624,-0.8508 0.3624 -0.8508c 0.0000,-0.3256 -0.1471,-0.5567 -0.1471 -0.5567c -0.1471,-0.2311 -0.3992,-0.4044 -0.3992 -0.4044c -0.2521,-0.1733 -0.5830,-0.3151 -0.5830 -0.3151c -0.3309,-0.1418 -0.6880,-0.2889 -0.6880 -0.2889c -0.3992,0.2731 -0.6670,0.6355 -0.6670 0.6355c -0.2679,0.3624 -0.2679,0.8246 -0.2679 0.8246ZM 264.9519,568.2038 ZM 266.8427,566.3445 c 0.3361,-0.3046 0.5200,-0.6408 0.5200 -0.6408c 0.1838,-0.3361 0.1838,-0.7038 0.1838 -0.7038c 0.0000,-0.5042 -0.3046,-0.8456 -0.3046 -0.8456c -0.3046,-0.3414 -0.8613,-0.3414 -0.8613 -0.3414c -0.4727,-0.0000 -0.7773,0.2941 -0.7773 0.2941c -0.3046,0.2941 -0.3046,0.7878 -0.3046 0.7878c 0.0000,0.3046 0.1261,0.5200 0.1261 0.5200c 0.1261,0.2153 0.3414,0.3834 0.3414 0.3834c 0.2153,0.1681 0.4937,0.2994 0.4937 0.2994c 0.2784,0.1313 0.5830,0.2468 0.5830 0.2468ZM 266.8427,566.3445 ZM 264.1746,568.2878 c 0.0000,-0.3256 0.1103,-0.6040 0.1103 -0.6040c 0.1103,-0.2784 0.2836,-0.5042 0.2836 -0.5042c 0.1733,-0.2258 0.3992,-0.3992 0.3992 -0.3992c 0.2258,-0.1733 0.4674,-0.2994 0.4674 -0.2994v -0.0420 c -0.3676,-0.2626 -0.6513,-0.6355 -0.6513 -0.6355c -0.2836,-0.3729 -0.2836,-0.9086 -0.2836 -0.9086c 0.0000,-0.3887 0.1471,-0.7038 0.1471 -0.7038c 0.1471,-0.3151 0.3992,-0.5410 0.3992 -0.5410c 0.2521,-0.2258 0.5987,-0.3519 0.5987 -0.3519c 0.3466,-0.1261 0.7563,-0.1261 0.7563 -0.1261c 0.4412,0.0000 0.7878,0.1313 0.7878 0.1313c 0.3466,0.1313 0.5935,0.3676 0.5935 0.3676c 0.2468,0.2363 0.3782,0.5672 0.3782 0.5672c 0.1313,0.3309 0.1313,0.7195 0.1313 0.7195c 0.0000,0.2626 -0.0893,0.5042 -0.0893 0.5042c -0.0893,0.2416 -0.2206,0.4517 -0.2206 0.4517c -0.1313,0.2101 -0.2941,0.3782 -0.2941 0.3782c -0.1628,0.1681 -0.3204,0.2836 -0.3204 0.2836v 0.0420 c 0.2206,0.1261 0.4307,0.2889 0.4307 0.2889c 0.2101,0.1628 0.3729,0.3676 0.3729 0.3676c 0.1628,0.2048 0.2626,0.4674 0.2626 0.4674c 0.0998,0.2626 0.0998,0.5987 0.0998 0.5987c 0.0000,0.3782 -0.1576,0.7038 -0.1576 0.7038c -0.1576,0.3256 -0.4412,0.5672 -0.4412 0.5672c -0.2836,0.2416 -0.6828,0.3782 -0.6828 0.3782c -0.3992,0.1366 -0.8824,0.1366 -0.8824 0.1366c -0.4727,-0.0000 -0.8771,-0.1366 -0.8771 -0.1366c -0.4044,-0.1366 -0.6933,-0.3834 -0.6933 -0.3834c -0.2889,-0.2468 -0.4569,-0.5830 -0.4569 -0.5830c -0.1681,-0.3361 -0.1681,-0.7353 -0.1681 -0.7353ZM 268.9645,570.0000 ZM 271.5801,570.1261 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 271.5801,570.1261 ZM 271.5801,569.4328 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670Z"/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 318.4522,570.0000 ZM 319.2821,569.2857 h 1.5336 v -4.9370 h -1.2185 v -0.5567 c 0.4622,-0.0840 0.8036,-0.2048 0.8036 -0.2048c 0.3414,-0.1208 0.6145,-0.2889 0.6145 -0.2889h 0.6618 v 5.9874 h 1.3866 v 0.7143 h -3.7815 v -0.7143 ZM 323.6728,570.0000 ZM 326.2884,570.1261 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 326.2884,570.1261 ZM 326.2884,569.4328 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670ZM 328.8934,570.0000 ZM 331.5090,570.1261 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 331.5090,570.1261 ZM 331.5090,569.4328 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670Z"/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 375.5713,570.0000 ZM 376.4011,569.2857 h 1.5336 v -4.9370 h -1.2185 v -0.5567 c 0.4622,-0.0840 0.8036,-0.2048 0.8036 -0.2048c 0.3414,-0.1208 0.6145,-0.2889 0.6145 -0.2889h 0.6618 v 5.9874 h 1.3866 v 0.7143 h -3.7815 v -0.7143 ZM 380.7919,570.0000 ZM 381.2120,569.4853 c 0.7563,-0.7563 1.3445,-1.3655 1.3445 -1.3655c 0.5882,-0.6092 0.9874,-1.1292 0.9874 -1.1292c 0.3992,-0.5200 0.6092,-0.9559 0.6092 -0.9559c 0.2101,-0.4359 0.2101,-0.8456 0.2101 -0.8456c 0.0000,-0.5777 -0.3151,-0.9454 -0.3151 -0.9454c -0.3151,-0.3676 -0.9559,-0.3676 -0.9559 -0.3676c -0.4202,-0.0000 -0.7773,0.2363 -0.7773 0.2363c -0.3571,0.2363 -0.6513,0.5725 -0.6513 0.5725l -0.4937,-0.4937 c 0.4202,-0.4622 0.8929,-0.7405 0.8929 -0.7405c 0.4727,-0.2784 1.1345,-0.2784 1.1345 -0.2784c 0.9349,0.0000 1.4706,0.5410 1.4706 0.5410c 0.5357,0.5410 0.5357,1.4338 0.5357 1.4338c 0.0000,0.4727 -0.2048,0.9506 -0.2048 0.9506c -0.2048,0.4779 -0.5672,0.9874 -0.5672 0.9874c -0.3624,0.5095 -0.8613,1.0609 -0.8613 1.0609c -0.4989,0.5515 -1.0977,1.1712 -1.0977 1.1712c 0.2731,-0.0210 0.5672,-0.0420 0.5672 -0.0420c 0.2941,-0.0210 0.5567,-0.0210 0.5567 -0.0210h 1.9433 v 0.7458 h -4.3277 v -0.5147 ZM 386.0124,570.0000 ZM 388.6280,570.1261 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 388.6280,570.1261 ZM 388.6280,569.4328 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670Z"/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 432.6903,570.0000 ZM 433.5201,569.2857 h 1.5336 v -4.9370 h -1.2185 v -0.5567 c 0.4622,-0.0840 0.8036,-0.2048 0.8036 -0.2048c 0.3414,-0.1208 0.6145,-0.2889 0.6145 -0.2889h 0.6618 v 5.9874 h 1.3866 v 0.7143 h -3.7815 v -0.7143 ZM 437.9109,570.0000 ZM 441.1042,567.4580 v -1.9433 c 0.0000,-0.2731 0.0158,-0.6460 0.0158 -0.6460c 0.0158,-0.3729 0.0368,-0.6460 0.0368 -0.6460h -0.0420 c -0.1261,0.2416 -0.2626,0.4727 -0.2626 0.4727c -0.1366,0.2311 -0.2836,0.4727 -0.2836 0.4727l -1.5651,2.2899 h 2.1008 ZM 441.1042,567.4580 ZM 442.8373,568.1513 h -0.9139 v 1.8487 h -0.8193 v -1.8487 h -3.0147 v -0.5672 l 2.8676,-4.2857 h 0.9664 v 4.1597 h 0.9139 v 0.6933 ZM 443.1315,570.0000 ZM 445.7470,570.1261 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 445.7470,570.1261 ZM 445.7470,569.4328 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670Z"/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 489.8093,570.0000 ZM 490.6391,569.2857 h 1.5336 v -4.9370 h -1.2185 v -0.5567 c 0.4622,-0.0840 0.8036,-0.2048 0.8036 -0.2048c 0.3414,-0.1208 0.6145,-0.2889 0.6145 -0.2889h 0.6618 v 5.9874 h 1.3866 v 0.7143 h -3.7815 v -0.7143 ZM 495.0299,570.0000 ZM 497.8450,569.4433 c 0.2521,0.0000 0.4622,-0.1050 0.4622 -0.1050c 0.2101,-0.1050 0.3676,-0.2994 0.3676 -0.2994c 0.1576,-0.1943 0.2468,-0.4622 0.2468 -0.4622c 0.0893,-0.2679 0.0893,-0.6040 0.0893 -0.6040c 0.0000,-0.6618 -0.3046,-1.0399 -0.3046 -1.0399c -0.3046,-0.3782 -0.9349,-0.3782 -0.9349 -0.3782c -0.3151,-0.0000 -0.6880,0.2048 -0.6880 0.2048c -0.3729,0.2048 -0.7090,0.6775 -0.7090 0.6775c 0.0840,0.9874 0.4569,1.4968 0.4569 1.4968c 0.3729,0.5095 1.0137,0.5095 1.0137 0.5095ZM 497.8450,569.4433 ZM 499.2211,564.4223 c -0.2101,-0.2416 -0.4989,-0.3834 -0.4989 -0.3834c -0.2889,-0.1418 -0.6040,-0.1418 -0.6040 -0.1418c -0.3466,-0.0000 -0.6618,0.1471 -0.6618 0.1471c -0.3151,0.1471 -0.5567,0.4832 -0.5567 0.4832c -0.2416,0.3361 -0.3887,0.8771 -0.3887 0.8771c -0.1471,0.5410 -0.1576,1.3393 -0.1576 1.3393c 0.3151,-0.3887 0.7353,-0.6145 0.7353 -0.6145c 0.4202,-0.2258 0.8298,-0.2258 0.8298 -0.2258c 0.8718,0.0000 1.3918,0.5147 1.3918 0.5147c 0.5200,0.5147 0.5200,1.5546 0.5200 1.5546c 0.0000,0.4832 -0.1576,0.8771 -0.1576 0.8771c -0.1576,0.3939 -0.4307,0.6775 -0.4307 0.6775c -0.2731,0.2836 -0.6303,0.4412 -0.6303 0.4412c -0.3571,0.1576 -0.7668,0.1576 -0.7668 0.1576c -0.4937,-0.0000 -0.9139,-0.1996 -0.9139 -0.1996c -0.4202,-0.1996 -0.7300,-0.6040 -0.7300 -0.6040c -0.3099,-0.4044 -0.4884,-1.0084 -0.4884 -1.0084c -0.1786,-0.6040 -0.1786,-1.4128 -0.1786 -1.4128c 0.0000,-1.0084 0.2101,-1.7174 0.2101 -1.7174c 0.2101,-0.7090 0.5672,-1.1555 0.5672 -1.1555c 0.3571,-0.4464 0.8141,-0.6513 0.8141 -0.6513c 0.4569,-0.2048 0.9611,-0.2048 0.9611 -0.2048c 0.5462,0.0000 0.9401,0.2048 0.9401 0.2048c 0.3939,0.2048 0.6775,0.5095 0.6775 0.5095ZM 500.2505,570.0000 ZM 502.8660,570.1261 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 502.8660,570.1261 ZM 502.8660,569.4328 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670Z"/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 546.9283,570.0000 ZM 547.7582,569.2857 h 1.5336 v -4.9370 h -1.2185 v -0.5567 c 0.4622,-0.0840 0.8036,-0.2048 0.8036 -0.2048c 0.3414,-0.1208 0.6145,-0.2889 0.6145 -0.2889h 0.6618 v 5.9874 h 1.3866 v 0.7143 h -3.7815 v -0.7143 ZM 552.1489,570.0000 ZM 553.3569,568.2038 c 0.0000,0.2836 0.1103,0.5147 0.1103 0.5147c 0.1103,0.2311 0.3046,0.4044 0.3046 0.4044c 0.1943,0.1733 0.4569,0.2679 0.4569 0.2679c 0.2626,0.0945 0.5672,0.0945 0.5672 0.0945c 0.5882,0.0000 0.9506,-0.3256 0.9506 -0.3256c 0.3624,-0.3256 0.3624,-0.8508 0.3624 -0.8508c 0.0000,-0.3256 -0.1471,-0.5567 -0.1471 -0.5567c -0.1471,-0.2311 -0.3992,-0.4044 -0.3992 -0.4044c -0.2521,-0.1733 -0.5830,-0.3151 -0.5830 -0.3151c -0.3309,-0.1418 -0.6880,-0.2889 -0.6880 -0.2889c -0.3992,0.2731 -0.6670,0.6355 -0.6670 0.6355c -0.2679,0.3624 -0.2679,0.8246 -0.2679 0.8246ZM 553.3569,568.2038 ZM 555.2477,566.3445 c 0.3361,-0.3046 0.5200,-0.6408 0.5200 -0.6408c 0.1838,-0.3361 0.1838,-0.7038 0.1838 -0.7038c 0.0000,-0.5042 -0.3046,-0.8456 -0.3046 -0.8456c -0.3046,-0.3414 -0.8613,-0.3414 -0.8613 -0.3414c -0.4727,-0.0000 -0.7773,0.2941 -0.7773 0.2941c -0.3046,0.2941 -0.3046,0.7878 -0.3046 0.7878c 0.0000,0.3046 0.1261,0.5200 0.1261 0.5200c 0.1261,0.2153 0.3414,0.3834 0.3414 0.3834c 0.2153,0.1681 0.4937,0.2994 0.4937 0.2994c 0.2784,0.1313 0.5830,0.2468 0.5830 0.2468ZM 555.2477,566.3445 ZM 552.5796,568.2878 c 0.0000,-0.3256 0.1103,-0.6040 0.1103 -0.6040c 0.1103,-0.2784 0.2836,-0.5042 0.2836 -0.5042c 0.1733,-0.2258 0.3992,-0.3992 0.3992 -0.3992c 0.2258,-0.1733 0.4674,-0.2994 0.4674 -0.2994v -0.0420 c -0.3676,-0.2626 -0.6513,-0.6355 -0.6513 -0.6355c -0.2836,-0.3729 -0.2836,-0.9086 -0.2836 -0.9086c 0.0000,-0.3887 0.1471,-0.7038 0.1471 -0.7038c 0.1471,-0.3151 0.3992,-0.5410 0.3992 -0.5410c 0.2521,-0.2258 0.5987,-0.3519 0.5987 -0.3519c 0.3466,-0.1261 0.7563,-0.1261 0.7563 -0.1261c 0.4412,0.0000 0.7878,0.1313 0.7878 0.1313c 0.3466,0.1313 0.5935,0.3676 0.5935 0.3676c 0.2468,0.2363 0.3782,0.5672 0.3782 0.5672c 0.1313,0.3309 0.1313,0.7195 0.1313 0.7195c 0.0000,0.2626 -0.0893,0.5042 -0.0893 0.5042c -0.0893,0.2416 -0.2206,0.4517 -0.2206 0.4517c -0.1313,0.2101 -0.2941,0.3782 -0.2941 0.3782c -0.1628,0.1681 -0.3204,0.2836 -0.3204 0.2836v 0.0420 c 0.2206,0.1261 0.4307,0.2889 0.4307 0.2889c 0.2101,0.1628 0.3729,0.3676 0.3729 0.3676c 0.1628,0.2048 0.2626,0.4674 0.2626 0.4674c 0.0998,0.2626 0.0998,0.5987 0.0998 0.5987c 0.0000,0.3782 -0.1576,0.7038 -0.1576 0.7038c -0.1576,0.3256 -0.4412,0.5672 -0.4412 0.5672c -0.2836,0.2416 -0.6828,0.3782 -0.6828 0.3782c -0.3992,0.1366 -0.8824,0.1366 -0.8824 0.1366c -0.4727,-0.0000 -0.8771,-0.1366 -0.8771 -0.1366c -0.4044,-0.1366 -0.6933,-0.3834 -0.6933 -0.3834c -0.2889,-0.2468 -0.4569,-0.5830 -0.4569 -0.5830c -0.1681,-0.3361 -0.1681,-0.7353 -0.1681 -0.7353ZM 557.3695,570.0000 ZM 559.9851,570.1261 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 559.9851,570.1261 ZM 559.9851,569.4328 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670Z"/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 603.8215,570.0000 ZM 604.2417,569.4853 c 0.7563,-0.7563 1.3445,-1.3655 1.3445 -1.3655c 0.5882,-0.6092 0.9874,-1.1292 0.9874 -1.1292c 0.3992,-0.5200 0.6092,-0.9559 0.6092 -0.9559c 0.2101,-0.4359 0.2101,-0.8456 0.2101 -0.8456c 0.0000,-0.5777 -0.3151,-0.9454 -0.3151 -0.9454c -0.3151,-0.3676 -0.9559,-0.3676 -0.9559 -0.3676c -0.4202,-0.0000 -0.7773,0.2363 -0.7773 0.2363c -0.3571,0.2363 -0.6513,0.5725 -0.6513 0.5725l -0.4937,-0.4937 c 0.4202,-0.4622 0.8929,-0.7405 0.8929 -0.7405c 0.4727,-0.2784 1.1345,-0.2784 1.1345 -0.2784c 0.9349,0.0000 1.4706,0.5410 1.4706 0.5410c 0.5357,0.5410 0.5357,1.4338 0.5357 1.4338c 0.0000,0.4727 -0.2048,0.9506 -0.2048 0.9506c -0.2048,0.4779 -0.5672,0.9874 -0.5672 0.9874c -0.3624,0.5095 -0.8613,1.0609 -0.8613 1.0609c -0.4989,0.5515 -1.0977,1.1712 -1.0977 1.1712c 0.2731,-0.0210 0.5672,-0.0420 0.5672 -0.0420c 0.2941,-0.0210 0.5567,-0.0210 0.5567 -0.0210h 1.9433 v 0.7458 h -4.3277 v -0.5147 ZM 609.0421,570.0000 ZM 611.6576,570.1261 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 611.6576,570.1261 ZM 611.6576,569.4328 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670ZM 614.2627,570.0000 ZM 616.8782,570.1261 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 616.8782,570.1261 ZM 616.8782,569.4328 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670Z"/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 660.9405,570.0000 ZM 661.3607,569.4853 c 0.7563,-0.7563 1.3445,-1.3655 1.3445 -1.3655c 0.5882,-0.6092 0.9874,-1.1292 0.9874 -1.1292c 0.3992,-0.5200 0.6092,-0.9559 0.6092 -0.9559c 0.2101,-0.4359 0.2101,-0.8456 0.2101 -0.8456c 0.0000,-0.5777 -0.3151,-0.9454 -0.3151 -0.9454c -0.3151,-0.3676 -0.9559,-0.3676 -0.9559 -0.3676c -0.4202,-0.0000 -0.7773,0.2363 -0.7773 0.2363c -0.3571,0.2363 -0.6513,0.5725 -0.6513 0.5725l -0.4937,-0.4937 c 0.4202,-0.4622 0.8929,-0.7405 0.8929 -0.7405c 0.4727,-0.2784 1.1345,-0.2784 1.1345 -0.2784c 0.9349,0.0000 1.4706,0.5410 1.4706 0.5410c 0.5357,0.5410 0.5357,1.4338 0.5357 1.4338c 0.0000,0.4727 -0.2048,0.9506 -0.2048 0.9506c -0.2048,0.4779 -0.5672,0.9874 -0.5672 0.9874c -0.3624,0.5095 -0.8613,1.0609 -0.8613 1.0609c -0.4989,0.5515 -1.0977,1.1712 -1.0977 1.1712c 0.2731,-0.0210 0.5672,-0.0420 0.5672 -0.0420c 0.2941,-0.0210 0.5567,-0.0210 0.5567 -0.0210h 1.9433 v 0.7458 h -4.3277 v -0.5147 ZM 666.1611,570.0000 ZM 666.5813,569.4853 c 0.7563,-0.7563 1.3445,-1.3655 1.3445 -1.3655c 0.5882,-0.6092 0.9874,-1.1292 0.9874 -1.1292c 0.3992,-0.5200 0.6092,-0.9559 0.6092 -0.9559c 0.2101,-0.4359 0.2101,-0.8456 0.2101 -0.8456c 0.0000,-0.5777 -0.3151,-0.9454 -0.3151 -0.9454c -0.3151,-0.3676 -0.9559,-0.3676 -0.9559 -0.3676c -0.4202,-0.0000 -0.7773,0.2363 -0.7773 0.2363c -0.3571,0.2363 -0.6513,0.5725 -0.6513 0.5725l -0.4937,-0.4937 c 0.4202,-0.4622 0.8929,-0.7405 0.8929 -0.7405c 0.4727,-0.2784 1.1345,-0.2784 1.1345 -0.2784c 0.9349,0.0000 1.4706,0.5410 1.4706 0.5410c 0.5357,0.5410 0.5357,1.4338 0.5357 1.4338c 0.0000,0.4727 -0.2048,0.9506 -0.2048 0.9506c -0.2048,0.4779 -0.5672,0.9874 -0.5672 0.9874c -0.3624,0.5095 -0.8613,1.0609 -0.8613 1.0609c -0.4989,0.5515 -1.0977,1.1712 -1.0977 1.1712c 0.2731,-0.0210 0.5672,-0.0420 0.5672 -0.0420c 0.2941,-0.0210 0.5567,-0.0210 0.5567 -0.0210h 1.9433 v 0.7458 h -4.3277 v -0.5147 ZM 671.3817,570.0000 ZM 673.9973,570.1261 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 673.9973,570.1261 ZM 673.9973,569.4328 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670Z"/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 718.0596,570.0000 ZM 718.4797,569.4853 c 0.7563,-0.7563 1.3445,-1.3655 1.3445 -1.3655c 0.5882,-0.6092 0.9874,-1.1292 0.9874 -1.1292c 0.3992,-0.5200 0.6092,-0.9559 0.6092 -0.9559c 0.2101,-0.4359 0.2101,-0.8456 0.2101 -0.8456c 0.0000,-0.5777 -0.3151,-0.9454 -0.3151 -0.9454c -0.3151,-0.3676 -0.9559,-0.3676 -0.9559 -0.3676c -0.4202,-0.0000 -0.7773,0.2363 -0.7773 0.2363c -0.3571,0.2363 -0.6513,0.5725 -0.6513 0.5725l -0.4937,-0.4937 c 0.4202,-0.4622 0.8929,-0.7405 0.8929 -0.7405c 0.4727,-0.2784 1.1345,-0.2784 1.1345 -0.2784c 0.9349,0.0000 1.4706,0.5410 1.4706 0.5410c 0.5357,0.5410 0.5357,1.4338 0.5357 1.4338c 0.0000,0.4727 -0.2048,0.9506 -0.2048 0.9506c -0.2048,0.4779 -0.5672,0.9874 -0.5672 0.9874c -0.3624,0.5095 -0.8613,1.0609 -0.8613 1.0609c -0.4989,0.5515 -1.0977,1.1712 -1.0977 1.1712c 0.2731,-0.0210 0.5672,-0.0420 0.5672 -0.0420c 0.2941,-0.0210 0.5567,-0.0210 0.5567 -0.0210h 1.9433 v 0.7458 h -4.3277 v -0.5147 ZM 723.2801,570.0000 ZM 726.4734,567.4580 v -1.9433 c 0.0000,-0.2731 0.0158,-0.6460 0.0158 -0.6460c 0.0158,-0.3729 0.0368,-0.6460 0.0368 -0.6460h -0.0420 c -0.1261,0.2416 -0.2626,0.4727 -0.2626 0.4727c -0.1366,0.2311 -0.2836,0.4727 -0.2836 0.4727l -1.5651,2.2899 h 2.1008 ZM 726.4734,567.4580 ZM 728.2066,568.1513 h -0.9139 v 1.8487 h -0.8193 v -1.8487 h -3.0147 v -0.5672 l 2.8676,-4.2857 h 0.9664 v 4.1597 h 0.9139 v 0.6933 ZM 728.5007,570.0000 ZM 731.1163,570.1261 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 731.1163,570.1261 ZM 731.1163,569.4328 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670Z"/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 775.1786,570.0000 ZM 775.5987,569.4853 c 0.7563,-0.7563 1.3445,-1.3655 1.3445 -1.3655c 0.5882,-0.6092 0.9874,-1.1292 0.9874 -1.1292c 0.3992,-0.5200 0.6092,-0.9559 0.6092 -0.9559c 0.2101,-0.4359 0.2101,-0.8456 0.2101 -0.8456c 0.0000,-0.5777 -0.3151,-0.9454 -0.3151 -0.9454c -0.3151,-0.3676 -0.9559,-0.3676 -0.9559 -0.3676c -0.4202,-0.0000 -0.7773,0.2363 -0.7773 0.2363c -0.3571,0.2363 -0.6513,0.5725 -0.6513 0.5725l -0.4937,-0.4937 c 0.4202,-0.4622 0.8929,-0.7405 0.8929 -0.7405c 0.4727,-0.2784 1.1345,-0.2784 1.1345 -0.2784c 0.9349,0.0000 1.4706,0.5410 1.4706 0.5410c 0.5357,0.5410 0.5357,1.4338 0.5357 1.4338c 0.0000,0.4727 -0.2048,0.9506 -0.2048 0.9506c -0.2048,0.4779 -0.5672,0.9874 -0.5672 0.9874c -0.3624,0.5095 -0.8613,1.0609 -0.8613 1.0609c -0.4989,0.5515 -1.0977,1.1712 -1.0977 1.1712c 0.2731,-0.0210 0.5672,-0.0420 0.5672 -0.0420c 0.2941,-0.0210 0.5567,-0.0210 0.5567 -0.0210h 1.9433 v 0.7458 h -4.3277 v -0.5147 ZM 780.3992,570.0000 ZM 783.2143,569.4433 c 0.2521,0.0000 0.4622,-0.1050 0.4622 -0.1050c 0.2101,-0.1050 0.3676,-0.2994 0.3676 -0.2994c 0.1576,-0.1943 0.2468,-0.4622 0.2468 -0.4622c 0.0893,-0.2679 0.0893,-0.6040 0.0893 -0.6040c 0.0000,-0.6618 -0.3046,-1.0399 -0.3046 -1.0399c -0.3046,-0.3782 -0.9349,-0.3782 -0.9349 -0.3782c -0.3151,-0.0000 -0.6880,0.2048 -0.6880 0.2048c -0.3729,0.2048 -0.7090,0.6775 -0.7090 0.6775c 0.0840,0.9874 0.4569,1.4968 0.4569 1.4968c 0.3729,0.5095 1.0137,0.5095 1.0137 0.5095ZM 783.2143,569.4433 ZM 784.5903,564.4223 c -0.2101,-0.2416 -0.4989,-0.3834 -0.4989 -0.3834c -0.2889,-0.1418 -0.6040,-0.1418 -0.6040 -0.1418c -0.3466,-0.0000 -0.6618,0.1471 -0.6618 0.1471c -0.3151,0.1471 -0.5567,0.4832 -0.5567 0.4832c -0.2416,0.3361 -0.3887,0.8771 -0.3887 0.8771c -0.1471,0.5410 -0.1576,1.3393 -0.1576 1.3393c 0.3151,-0.3887 0.7353,-0.6145 0.7353 -0.6145c 0.4202,-0.2258 0.8298,-0.2258 0.8298 -0.2258c 0.8718,0.0000 1.3918,0.5147 1.3918 0.5147c 0.5200,0.5147 0.5200,1.5546 0.5200 1.5546c 0.0000,0.4832 -0.1576,0.8771 -0.1576 0.8771c -0.1576,0.3939 -0.4307,0.6775 -0.4307 0.6775c -0.2731,0.2836 -0.6303,0.4412 -0.6303 0.4412c -0.3571,0.1576 -0.7668,0.1576 -0.7668 0.1576c -0.4937,-0.0000 -0.9139,-0.1996 -0.9139 -0.1996c -0.4202,-0.1996 -0.7300,-0.6040 -0.7300 -0.6040c -0.3099,-0.4044 -0.4884,-1.0084 -0.4884 -1.0084c -0.1786,-0.6040 -0.1786,-1.4128 -0.1786 -1.4128c 0.0000,-1.0084 0.2101,-1.7174 0.2101 -1.7174c 0.2101,-0.7090 0.5672,-1.1555 0.5672 -1.1555c 0.3571,-0.4464 0.8141,-0.6513 0.8141 -0.6513c 0.4569,-0.2048 0.9611,-0.2048 0.9611 -0.2048c 0.5462,0.0000 0.9401,0.2048 0.9401 0.2048c 0.3939,0.2048 0.6775,0.5095 0.6775 0.5095ZM 785.6197,570.0000 ZM 788.2353,570.1261 c -1.0189,-0.0000 -1.5861,-0.9034 -1.5861 -0.9034c -0.5672,-0.9034 -0.5672,-2.5945 -0.5672 -2.5945c 0.0000,-1.6912 0.5672,-2.5735 0.5672 -2.5735c 0.5672,-0.8824 1.5861,-0.8824 1.5861 -0.8824c 1.0084,0.0000 1.5756,0.8824 1.5756 0.8824c 0.5672,0.8824 0.5672,2.5735 0.5672 2.5735c 0.0000,1.6912 -0.5672,2.5945 -0.5672 2.5945c -0.5672,0.9034 -1.5756,0.9034 -1.5756 0.9034ZM 788.2353,570.1261 ZM 788.2353,569.4328 c 0.2941,0.0000 0.5305,-0.1628 0.5305 -0.1628c 0.2363,-0.1628 0.4097,-0.5042 0.4097 -0.5042c 0.1733,-0.3414 0.2679,-0.8718 0.2679 -0.8718c 0.0945,-0.5305 0.0945,-1.2658 0.0945 -1.2658c 0.0000,-0.7353 -0.0945,-1.2605 -0.0945 -1.2605c -0.0945,-0.5252 -0.2679,-0.8561 -0.2679 -0.8561c -0.1733,-0.3309 -0.4097,-0.4884 -0.4097 -0.4884c -0.2363,-0.1576 -0.5305,-0.1576 -0.5305 -0.1576c -0.2941,-0.0000 -0.5357,0.1576 -0.5357 0.1576c -0.2416,0.1576 -0.4149,0.4884 -0.4149 0.4884c -0.1733,0.3309 -0.2679,0.8561 -0.2679 0.8561c -0.0945,0.5252 -0.0945,1.2605 -0.0945 1.2605c 0.0000,1.4706 0.3624,2.1376 0.3624 2.1376c 0.3624,0.6670 0.9506,0.6670 0.9506 0.6670Z"/></g><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(255,0,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 10.0000,585.0000 h 20.0000 "/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 35.0735,586.6071 ZM 36.8908,582.9832 h 1.1555 c 0.8088,0.0000 1.2395,-0.3309 1.2395 -0.3309c 0.4307,-0.3309 0.4307,-1.0032 0.4307 -1.0032c 0.0000,-0.6828 -0.4307,-0.9559 -0.4307 -0.9559c -0.4307,-0.2731 -1.2395,-0.2731 -1.2395 -0.2731h -1.1555 v 2.5630 ZM 36.8908,582.9832 ZM 39.8004,586.6071 l -1.6597,-2.9097 h -1.2500 v 2.9097 h -0.8718 v -6.8908 h 2.1534 c 0.5252,0.0000 0.9716,0.0998 0.9716 0.0998c 0.4464,0.0998 0.7668,0.3309 0.7668 0.3309c 0.3204,0.2311 0.4989,0.5987 0.4989 0.5987c 0.1786,0.3676 0.1786,0.9034 0.1786 0.9034c 0.0000,0.8088 -0.4202,1.2920 -0.4202 1.2920c -0.4202,0.4832 -1.1239,0.6618 -1.1239 0.6618l 1.7437,3.0042 h -0.9874 ZM 41.0714,586.6071 ZM 41.5546,584.0651 c 0.0000,-0.6303 0.1943,-1.1292 0.1943 -1.1292c 0.1943,-0.4989 0.5147,-0.8456 0.5147 -0.8456c 0.3204,-0.3466 0.7300,-0.5305 0.7300 -0.5305c 0.4097,-0.1838 0.8508,-0.1838 0.8508 -0.1838c 0.4832,0.0000 0.8666,0.1681 0.8666 0.1681c 0.3834,0.1681 0.6408,0.4832 0.6408 0.4832c 0.2574,0.3151 0.3939,0.7563 0.3939 0.7563c 0.1366,0.4412 0.1366,0.9874 0.1366 0.9874c 0.0000,0.2836 -0.0315,0.4727 -0.0315 0.4727h -3.4454 c 0.0525,0.8298 0.5095,1.3130 0.5095 1.3130c 0.4569,0.4832 1.1922,0.4832 1.1922 0.4832c 0.3676,0.0000 0.6775,-0.1103 0.6775 -0.1103c 0.3099,-0.1103 0.5935,-0.2889 0.5935 -0.2889l 0.3046,0.5672 c -0.3361,0.2101 -0.7458,0.3676 -0.7458 0.3676c -0.4097,0.1576 -0.9349,0.1576 -0.9349 0.1576c -0.5147,-0.0000 -0.9611,-0.1838 -0.9611 -0.1838c -0.4464,-0.1838 -0.7773,-0.5252 -0.7773 -0.5252c -0.3309,-0.3414 -0.5200,-0.8351 -0.5200 -0.8351c -0.1891,-0.4937 -0.1891,-1.1239 -0.1891 -1.1239ZM 41.5546,584.0651 ZM 45.1261,583.6765 c 0.0000,-0.7878 -0.3309,-1.2027 -0.3309 -1.2027c -0.3309,-0.4149 -0.9296,-0.4149 -0.9296 -0.4149c -0.2731,-0.0000 -0.5200,0.1103 -0.5200 0.1103c -0.2468,0.1103 -0.4464,0.3151 -0.4464 0.3151c -0.1996,0.2048 -0.3309,0.5042 -0.3309 0.5042c -0.1313,0.2994 -0.1733,0.6880 -0.1733 0.6880h 2.7311 ZM 46.2815,586.6071 ZM 46.7752,584.0651 c 0.0000,-0.6197 0.1838,-1.1187 0.1838 -1.1187c 0.1838,-0.4989 0.4884,-0.8456 0.4884 -0.8456c 0.3046,-0.3466 0.7038,-0.5357 0.7038 -0.5357c 0.3992,-0.1891 0.8403,-0.1891 0.8403 -0.1891c 0.4412,0.0000 0.7668,0.1576 0.7668 0.1576c 0.3256,0.1576 0.6618,0.4307 0.6618 0.4307l -0.0420,-0.8718 v -1.9643 h 0.8718 v 7.4790 h -0.7143 l -0.0735,-0.5987 h -0.0315 c -0.3046,0.2941 -0.6985,0.5095 -0.6985 0.5095c -0.3939,0.2153 -0.8456,0.2153 -0.8456 0.2153c -0.9664,-0.0000 -1.5389,-0.6933 -1.5389 -0.6933c -0.5725,-0.6933 -0.5725,-1.9748 -0.5725 -1.9748ZM 46.7752,584.0651 ZM 47.6681,584.0546 c 0.0000,0.9244 0.3676,1.4391 0.3676 1.4391c 0.3676,0.5147 1.0399,0.5147 1.0399 0.5147c 0.3571,0.0000 0.6723,-0.1733 0.6723 -0.1733c 0.3151,-0.1733 0.6303,-0.5305 0.6303 -0.5305v -2.6681 c -0.3256,-0.2941 -0.6250,-0.4149 -0.6250 -0.4149c -0.2994,-0.1208 -0.6145,-0.1208 -0.6145 -0.1208c -0.3046,-0.0000 -0.5725,0.1418 -0.5725 0.1418c -0.2679,0.1418 -0.4674,0.3992 -0.4674 0.3992c -0.1996,0.2574 -0.3151,0.6145 -0.3151 0.6145c -0.1155,0.3571 -0.1155,0.7983 -0.1155 0.7983Z"/></g><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,128,0)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 70.3046,585.0000 h 20.0000 "/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 95.3782,586.6071 ZM 95.9244,583.1618 c 0.0000,-0.8298 0.2363,-1.4916 0.2363 -1.4916c 0.2363,-0.6618 0.6618,-1.1239 0.6618 -1.1239c 0.4254,-0.4622 1.0032,-0.7090 1.0032 -0.7090c 0.5777,-0.2468 1.2710,-0.2468 1.2710 -0.2468c 0.7143,0.0000 1.1922,0.2679 1.1922 0.2679c 0.4779,0.2679 0.7826,0.5830 0.7826 0.5830l -0.4937,0.5567 c -0.2626,-0.2731 -0.6040,-0.4569 -0.6040 -0.4569c -0.3414,-0.1838 -0.8666,-0.1838 -0.8666 -0.1838c -0.5252,-0.0000 -0.9454,0.1943 -0.9454 0.1943c -0.4202,0.1943 -0.7143,0.5567 -0.7143 0.5567c -0.2941,0.3624 -0.4569,0.8771 -0.4569 0.8771c -0.1628,0.5147 -0.1628,1.1555 -0.1628 1.1555c 0.0000,0.6513 0.1523,1.1712 0.1523 1.1712c 0.1523,0.5200 0.4412,0.8876 0.4412 0.8876c 0.2889,0.3676 0.7143,0.5672 0.7143 0.5672c 0.4254,0.1996 0.9821,0.1996 0.9821 0.1996c 0.3676,0.0000 0.6985,-0.1103 0.6985 -0.1103c 0.3309,-0.1103 0.5410,-0.2994 0.5410 -0.2994v -1.7962 h -1.4601 v -0.7248 h 2.2584 v 2.8992 c -0.3361,0.3466 -0.8876,0.5725 -0.8876 0.5725c -0.5515,0.2258 -1.2447,0.2258 -1.2447 0.2258c -0.6828,-0.0000 -1.2500,-0.2416 -1.2500 -0.2416c -0.5672,-0.2416 -0.9769,-0.6985 -0.9769 -0.6985c -0.4097,-0.4569 -0.6408,-1.1239 -0.6408 -1.1239c -0.2311,-0.6670 -0.2311,-1.5074 -0.2311 -1.5074ZM 101.8592,586.6071 ZM 102.7206,581.5021 h 0.7143 l 0.0735,0.9244 h 0.0315 c 0.2626,-0.4832 0.6355,-0.7668 0.6355 -0.7668c 0.3729,-0.2836 0.8141,-0.2836 0.8141 -0.2836c 0.3046,0.0000 0.5462,0.1050 0.5462 0.1050l -0.1681,0.7563 c -0.1261,-0.0420 -0.2311,-0.0630 -0.2311 -0.0630c -0.1050,-0.0210 -0.2626,-0.0210 -0.2626 -0.0210c -0.3256,-0.0000 -0.6775,0.2626 -0.6775 0.2626c -0.3519,0.2626 -0.6145,0.9139 -0.6145 0.9139v 3.2773 h -0.8613 v -5.1050 ZM 105.3992,586.6071 ZM 105.8824,584.0651 c 0.0000,-0.6303 0.1943,-1.1292 0.1943 -1.1292c 0.1943,-0.4989 0.5147,-0.8456 0.5147 -0.8456c 0.3204,-0.3466 0.7300,-0.5305 0.7300 -0.5305c 0.4097,-0.1838 0.8508,-0.1838 0.8508 -0.1838c 0.4832,0.0000 0.8666,0.1681 0.8666 0.1681c 0.3834,0.1681 0.6408,0.4832 0.6408 0.4832c 0.2574,0.3151 0.3939,0.7563 0.3939 0.7563c 0.1366,0.4412 0.1366,0.9874 0.1366 0.9874c 0.0000,0.2836 -0.0315,0.4727 -0.0315 0.4727h -3.4454 c 0.0525,0.8298 0.5095,1.3130 0.5095 1.3130c 0.4569,0.4832 1.1922,0.4832 1.1922 0.4832c 0.3676,0.0000 0.6775,-0.1103 0.6775 -0.1103c 0.3099,-0.1103 0.5935,-0.2889 0.5935 -0.2889l 0.3046,0.5672 c -0.3361,0.2101 -0.7458,0.3676 -0.7458 0.3676c -0.4097,0.1576 -0.9349,0.1576 -0.9349 0.1576c -0.5147,-0.0000 -0.9611,-0.1838 -0.9611 -0.1838c -0.4464,-0.1838 -0.7773,-0.5252 -0.7773 -0.5252c -0.3309,-0.3414 -0.5200,-0.8351 -0.5200 -0.8351c -0.1891,-0.4937 -0.1891,-1.1239 -0.1891 -1.1239ZM 105.8824,584.0651 ZM 109.4538,583.6765 c 0.0000,-0.7878 -0.3309,-1.2027 -0.3309 -1.2027c -0.3309,-0.4149 -0.9296,-0.4149 -0.9296 -0.4149c -0.2731,-0.0000 -0.5200,0.1103 -0.5200 0.1103c -0.2468,0.1103 -0.4464,0.3151 -0.4464 0.3151c -0.1996,0.2048 -0.3309,0.5042 -0.3309 0.5042c -0.1313,0.2994 -0.1733,0.6880 -0.1733 0.6880h 2.7311 ZM 110.6092,586.6071 ZM 111.0924,584.0651 c 0.0000,-0.6303 0.1943,-1.1292 0.1943 -1.1292c 0.1943,-0.4989 0.5147,-0.8456 0.5147 -0.8456c 0.3204,-0.3466 0.7300,-0.5305 0.7300 -0.5305c 0.4097,-0.1838 0.8508,-0.1838 0.8508 -0.1838c 0.4832,0.0000 0.8666,0.1681 0.8666 0.1681c 0.3834,0.1681 0.6408,0.4832 0.6408 0.4832c 0.2574,0.3151 0.3939,0.7563 0.3939 0.7563c 0.1366,0.4412 0.1366,0.9874 0.1366 0.9874c 0.0000,0.2836 -0.0315,0.4727 -0.0315 0.4727h -3.4454 c 0.0525,0.8298 0.5095,1.3130 0.5095 1.3130c 0.4569,0.4832 1.1922,0.4832 1.1922 0.4832c 0.3676,0.0000 0.6775,-0.1103 0.6775 -0.1103c 0.3099,-0.1103 0.5935,-0.2889 0.5935 -0.2889l 0.3046,0.5672 c -0.3361,0.2101 -0.7458,0.3676 -0.7458 0.3676c -0.4097,0.1576 -0.9349,0.1576 -0.9349 0.1576c -0.5147,-0.0000 -0.9611,-0.1838 -0.9611 -0.1838c -0.4464,-0.1838 -0.7773,-0.5252 -0.7773 -0.5252c -0.3309,-0.3414 -0.5200,-0.8351 -0.5200 -0.8351c -0.1891,-0.4937 -0.1891,-1.1239 -0.1891 -1.1239ZM 111.0924,584.0651 ZM 114.6639,583.6765 c 0.0000,-0.7878 -0.3309,-1.2027 -0.3309 -1.2027c -0.3309,-0.4149 -0.9296,-0.4149 -0.9296 -0.4149c -0.2731,-0.0000 -0.5200,0.1103 -0.5200 0.1103c -0.2468,0.1103 -0.4464,0.3151 -0.4464 0.3151c -0.1996,0.2048 -0.3309,0.5042 -0.3309 0.5042c -0.1313,0.2994 -0.1733,0.6880 -0.1733 0.6880h 2.7311 ZM 115.8193,586.6071 ZM 116.6807,581.5021 h 0.7143 l 0.0735,0.7353 h 0.0315 c 0.3676,-0.3676 0.7721,-0.6145 0.7721 -0.6145c 0.4044,-0.2468 0.9401,-0.2468 0.9401 -0.2468c 0.8088,0.0000 1.1817,0.5042 1.1817 0.5042c 0.3729,0.5042 0.3729,1.4916 0.3729 1.4916v 3.2353 h -0.8613 v -3.1197 c 0.0000,-0.7248 -0.2311,-1.0452 -0.2311 -1.0452c -0.2311,-0.3204 -0.7353,-0.3204 -0.7353 -0.3204c -0.3992,-0.0000 -0.7038,0.1996 -0.7038 0.1996c -0.3046,0.1996 -0.6933,0.5882 -0.6933 0.5882v 3.6975 h -0.8613 v -5.1050 Z"/></g><g stroke-linejoin="round" stroke-opacity="1.0" fill-opacity="0.0" stroke="rgb(0,0,255)" stroke-width="0.9999999999999997" fill="rgb(0,0,0)" stroke-linecap="round" stroke-miterlimit="10.0"><path d="M 140.2206,585.0000 h 20.0000 "/></g><g stroke-linejoin="bevel" stroke-opacity="0.0" fill-opacity="1.0" stroke="rgb(0,0,0)" stroke-width="0.0" fill="rgb(0,0,0)" stroke-linecap="butt" stroke-miterlimit="10.0"><path d="M 165.2941,586.6071 ZM 166.2395,579.7164 h 2.0483 c 0.5252,0.0000 0.9611,0.0945 0.9611 0.0945c 0.4359,0.0945 0.7458,0.2941 0.7458 0.2941c 0.3099,0.1996 0.4832,0.5200 0.4832 0.5200c 0.1733,0.3204 0.1733,0.7721 0.1733 0.7721c 0.0000,0.5147 -0.2941,0.9296 -0.2941 0.9296c -0.2941,0.4149 -0.9034,0.5725 -0.9034 0.5725v 0.0420 c 0.7563,0.1155 1.1765,0.5252 1.1765 0.5252c 0.4202,0.4097 0.4202,1.1239 0.4202 1.1239c 0.0000,0.5042 -0.1891,0.8824 -0.1891 0.8824c -0.1891,0.3782 -0.5357,0.6303 -0.5357 0.6303c -0.3466,0.2521 -0.8298,0.3782 -0.8298 0.3782c -0.4832,0.1261 -1.0609,0.1261 -1.0609 0.1261h -2.1954 v -6.8908 ZM 166.2395,579.7164 ZM 168.1303,582.6576 c 0.8929,0.0000 1.2763,-0.3046 1.2763 -0.3046c 0.3834,-0.3046 0.3834,-0.8824 0.3834 -0.8824c 0.0000,-0.5672 -0.4044,-0.8141 -0.4044 -0.8141c -0.4044,-0.2468 -1.2132,-0.2468 -1.2132 -0.2468h -1.0609 v 2.2479 h 1.0189 ZM 168.1303,582.6576 ZM 168.3088,585.9139 c 0.8929,0.0000 1.3866,-0.3309 1.3866 -0.3309c 0.4937,-0.3309 0.4937,-1.0347 0.4937 -1.0347c 0.0000,-0.6408 -0.4832,-0.9401 -0.4832 -0.9401c -0.4832,-0.2994 -1.3971,-0.2994 -1.3971 -0.2994h -1.1975 v 2.6050 h 1.1975 ZM 171.4706,586.6071 ZM 172.3319,579.1282 h 0.8613 v 6.5126 c 0.0000,0.2101 0.0735,0.2941 0.0735 0.2941c 0.0735,0.0840 0.1681,0.0840 0.1681 0.0840h 0.0788 c 0.0000,0.0000 0.1103,-0.0210 0.1103 -0.0210l 0.1155,0.6513 c -0.0840,0.0420 -0.1996,0.0630 -0.1996 0.0630c -0.1155,0.0210 -0.2941,0.0210 -0.2941 0.0210c -0.4937,-0.0000 -0.7038,-0.2941 -0.7038 -0.2941c -0.2101,-0.2941 -0.2101,-0.8613 -0.2101 -0.8613v -6.4496 ZM 174.1492,586.6071 ZM 174.9370,581.5021 h 0.8718 v 3.1197 c 0.0000,0.7248 0.2258,1.0452 0.2258 1.0452c 0.2258,0.3204 0.7300,0.3204 0.7300 0.3204c 0.3992,0.0000 0.7038,-0.2048 0.7038 -0.2048c 0.3046,-0.2048 0.6723,-0.6565 0.6723 -0.6565v -3.6239 h 0.8613 v 5.1050 h -0.7143 l -0.0735,-0.7983 h -0.0315 c -0.3571,0.4202 -0.7511,0.6723 -0.7511 0.6723c -0.3939,0.2521 -0.9296,0.2521 -0.9296 0.2521c -0.8193,-0.0000 -1.1922,-0.5042 -1.1922 -0.5042c -0.3729,-0.5042 -0.3729,-1.4916 -0.3729 -1.4916v -3.2353 ZM 179.8634,586.6071 ZM 180.3466,584.0651 c 0.0000,-0.6303 0.1943,-1.1292 0.1943 -1.1292c 0.1943,-0.4989 0.5147,-0.8456 0.5147 -0.8456c 0.3204,-0.3466 0.7300,-0.5305 0.7300 -0.5305c 0.4097,-0.1838 0.8508,-0.1838 0.8508 -0.1838c 0.4832,0.0000 0.8666,0.1681 0.8666 0.1681c 0.3834,0.1681 0.6408,0.4832 0.6408 0.4832c 0.2574,0.3151 0.3939,0.7563 0.3939 0.7563c 0.1366,0.4412 0.1366,0.9874 0.1366 0.9874c 0.0000,0.2836 -0.0315,0.4727 -0.0315 0.4727h -3.4454 c 0.0525,0.8298 0.5095,1.3130 0.5095 1.3130c 0.4569,0.4832 1.1922,0.4832 1.1922 0.4832c 0.3676,0.0000 0.6775,-0.1103 0.6775 -0.1103c 0.3099,-0.1103 0.5935,-0.2889 0.5935 -0.2889l 0.3046,0.5672 c -0.3361,0.2101 -0.7458,0.3676 -0.7458 0.3676c -0.4097,0.1576 -0.9349,0.1576 -0.9349 0.1576c -0.5147,-0.0000 -0.9611,-0.1838 -0.9611 -0.1838c -0.4464,-0.1838 -0.7773,-0.5252 -0.7773 -0.5252c -0.3309,-0.3414 -0.5200,-0.8351 -0.5200 -0.8351c -0.1891,-0.4937 -0.1891,-1.1239 -0.1891 -1.1239ZM 180.3466,584.0651 ZM 183.9181,583.6765 c 0.0000,-0.7878 -0.3309,-1.2027 -0.3309 -1.2027c -0.3309,-0.4149 -0.9296,-0.4149 -0.9296 -0.4149c -0.2731,-0.0000 -0.5200,0.1103 -0.5200 0.1103c -0.2468,0.1103 -0.4464,0.3151 -0.4464 0.3151c -0.1996,0.2048 -0.3309,0.5042 -0.3309 0.5042c -0.1313,0.2994 -0.1733,0.6880 -0.1733 0.6880h 2.7311 Z"/></g></svg>
src/Graphics/Image.hs view
@@ -1,5 +1,7 @@ {-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# LANGUAGE CPP, BangPatterns, FlexibleContexts #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE FlexibleContexts #-} -- | -- Module : Graphics.Image -- Copyright : (c) Alexey Kuleshevich 2016@@ -86,7 +88,7 @@ -- ** Dimensions rows, cols, dims, -- ** Indexing- index, defaultIndex, maybeIndex,+ index, maybeIndex, defaultIndex, borderIndex, -- * Transformation -- ** Pointwise map, imap, zipWith, izipWith,@@ -110,8 +112,8 @@ import Graphics.Image.ColorSpace import Graphics.Image.IO import Graphics.Image.Interface hiding (makeImage, fromLists)-import Graphics.Image.Interface.Vector-import Graphics.Image.Interface.Repa (RD(..), RS(..), RP(..))+import Graphics.Image.Interface.Vector as V+import Graphics.Image.Interface.Repa as R (RD(..), RS(..), RP(..)) import Graphics.Image.Processing
src/Graphics/Image/ColorSpace.hs view
@@ -1,5 +1,8 @@ {-# OPTIONS_GHC -fno-warn-orphans #-}-{-# LANGUAGE BangPatterns, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE MultiParamTypeClasses #-} -- | -- Module : Graphics.Image.ColorSpace -- Copyright : (c) Alexey Kuleshevich 2016@@ -32,7 +35,6 @@ Word8, Word16, Word32, Word64 ) where - import Data.Word import GHC.Float import Graphics.Image.Interface hiding (map)@@ -210,27 +212,27 @@ toWord8 = id {-# INLINE toWord8 #-} - toWord16 = liftA toWord16' where+ toWord16 = fmap toWord16' where toWord16' !e = fromIntegral e * ((maxBound :: Word16) `div` fromIntegral (maxBound :: Word8)) {-# INLINE toWord16' #-} {-# INLINE toWord16 #-} - toWord32 = liftA toWord32' where+ toWord32 = fmap toWord32' where toWord32' !e = fromIntegral e * ((maxBound :: Word32) `div` fromIntegral (maxBound :: Word8)) {-# INLINE toWord32' #-} {-# INLINE toWord32 #-} - toWord64 = liftA toWord64' where+ toWord64 = fmap toWord64' where toWord64' !e = fromIntegral e * ((maxBound :: Word64) `div` fromIntegral (maxBound :: Word8)) {-# INLINE toWord64' #-} {-# INLINE toWord64 #-} - toFloat = liftA toFloat' where+ toFloat = fmap toFloat' where toFloat' !e = fromIntegral e / fromIntegral (maxBound :: Word8) {-# INLINE toFloat' #-} {-# INLINE toFloat #-} - toDouble = liftA toDouble' where+ toDouble = fmap toDouble' where toDouble' !e = fromIntegral e / fromIntegral (maxBound :: Word8) {-# INLINE toDouble' #-} {-# INLINE toDouble #-}@@ -242,7 +244,7 @@ -- | Values are scaled to @[0, 65535]@ range. instance Elevator Word16 where - toWord8 = liftA toWord8' where+ toWord8 = fmap toWord8' where toWord8' !e = fromIntegral $ fromIntegral e `div` ((maxBound :: Word16) `div` fromIntegral (maxBound :: Word8)) {-# INLINE toWord8' #-}@@ -251,22 +253,22 @@ toWord16 = id {-# INLINE toWord16 #-} - toWord32 = liftA toWord32' where+ toWord32 = fmap toWord32' where toWord32' !e = fromIntegral e * ((maxBound :: Word32) `div` fromIntegral (maxBound :: Word16)) {-# INLINE toWord32' #-} {-# INLINE toWord32 #-} - toWord64 = liftA toWord64' where+ toWord64 = fmap toWord64' where toWord64' !e = fromIntegral e * ((maxBound :: Word64) `div` fromIntegral (maxBound :: Word16)) {-# INLINE toWord64' #-} {-# INLINE toWord64 #-} - toFloat = liftA toFloat' where+ toFloat = fmap toFloat' where toFloat' !e = fromIntegral e / fromIntegral (maxBound :: Word16) {-# INLINE toFloat' #-} {-# INLINE toFloat #-} - toDouble = liftA toDouble' where+ toDouble = fmap toDouble' where toDouble' !e = fromIntegral e / fromIntegral (maxBound :: Word16) {-# INLINE toDouble' #-} {-# INLINE toDouble #-}@@ -278,13 +280,13 @@ -- | Values are scaled to @[0, 4294967295]@ range. instance Elevator Word32 where - toWord8 = liftA toWord8' where+ toWord8 = fmap toWord8' where toWord8' !e = fromIntegral $ fromIntegral e `div` ((maxBound :: Word32) `div` fromIntegral (maxBound :: Word8)) {-# INLINE toWord8' #-} {-# INLINE toWord8 #-} - toWord16 = liftA toWord16' where+ toWord16 = fmap toWord16' where toWord16' !e = fromIntegral $ fromIntegral e `div` ((maxBound :: Word32) `div` fromIntegral (maxBound :: Word16)) {-# INLINE toWord16' #-}@@ -293,17 +295,17 @@ toWord32 = id {-# INLINE toWord32 #-} - toWord64 = liftA toWord64' where+ toWord64 = fmap toWord64' where toWord64' !e = fromIntegral e * ((maxBound :: Word64) `div` fromIntegral (maxBound :: Word32)) {-# INLINE toWord64' #-} {-# INLINE toWord64 #-} - toFloat = liftA toFloat' where+ toFloat = fmap toFloat' where toFloat' !e = fromIntegral e / fromIntegral (maxBound :: Word32) {-# INLINE toFloat' #-} {-# INLINE toFloat #-} - toDouble = liftA toDouble' where+ toDouble = fmap toDouble' where toDouble' !e = fromIntegral e / fromIntegral (maxBound :: Word32) {-# INLINE toDouble' #-} {-# INLINE toDouble #-}@@ -315,19 +317,19 @@ -- | Values are scaled to @[0, 18446744073709551615]@ range. instance Elevator Word64 where - toWord8 = liftA toWord8' where+ toWord8 = fmap toWord8' where toWord8' !e = fromIntegral $ fromIntegral e `div` ((maxBound :: Word64) `div` fromIntegral (maxBound :: Word8)) {-# INLINE toWord8' #-} {-# INLINE toWord8 #-} - toWord16 = liftA toWord16' where+ toWord16 = fmap toWord16' where toWord16' !e = fromIntegral $ fromIntegral e `div` ((maxBound :: Word64) `div` fromIntegral (maxBound :: Word16)) {-# INLINE toWord16' #-} {-# INLINE toWord16 #-} - toWord32 = liftA toWord32' where+ toWord32 = fmap toWord32' where toWord32' !e = fromIntegral $ fromIntegral e `div` ((maxBound :: Word64) `div` fromIntegral (maxBound :: Word32)) {-# INLINE toWord32' #-}@@ -336,12 +338,12 @@ toWord64 = id {-# INLINE toWord64 #-} - toFloat = liftA toFloat' where+ toFloat = fmap toFloat' where toFloat' !e = fromIntegral e / fromIntegral (maxBound :: Word64) {-# INLINE toFloat' #-} {-# INLINE toFloat #-} - toDouble = liftA toDouble' where+ toDouble = fmap toDouble' where toDouble' !e = fromIntegral e / fromIntegral (maxBound :: Word64) {-# INLINE toDouble' #-} {-# INLINE toDouble #-}@@ -353,22 +355,22 @@ -- | Values are scaled to @[0.0, 1.0]@ range. instance Elevator Float where - toWord8 = liftA toWord8' where+ toWord8 = fmap toWord8' where toWord8' !e = round (fromIntegral (maxBound :: Word8) * e) {-# INLINE toWord8' #-} {-# INLINE toWord8 #-} - toWord16 = liftA toWord16' where+ toWord16 = fmap toWord16' where toWord16' !e = round (fromIntegral (maxBound :: Word16) * e) {-# INLINE toWord16' #-} {-# INLINE toWord16 #-} - toWord32 = liftA toWord32' where+ toWord32 = fmap toWord32' where toWord32' !e = round (fromIntegral (maxBound :: Word32) * e) {-# INLINE toWord32' #-} {-# INLINE toWord32 #-} - toWord64 = liftA toWord64' where+ toWord64 = fmap toWord64' where toWord64' !e = round (fromIntegral (maxBound :: Word64) * e) {-# INLINE toWord64' #-} {-# INLINE toWord64 #-}@@ -376,7 +378,7 @@ toFloat = id {-# INLINE toFloat #-} - toDouble = liftA float2Double+ toDouble = fmap float2Double {-# INLINE toDouble #-} fromDouble = toFloat@@ -386,27 +388,27 @@ -- | Values are scaled to @[0.0, 1.0]@ range. instance Elevator Double where - toWord8 = liftA toWord8' where+ toWord8 = fmap toWord8' where toWord8' !e = round (fromIntegral (maxBound :: Word8) * e) {-# INLINE toWord8' #-} {-# INLINE toWord8 #-} - toWord16 = liftA toWord16' where+ toWord16 = fmap toWord16' where toWord16' !e = round (fromIntegral (maxBound :: Word16) * e) {-# INLINE toWord16' #-} {-# INLINE toWord16 #-} - toWord32 = liftA toWord32' where+ toWord32 = fmap toWord32' where toWord32' !e = round (fromIntegral (maxBound :: Word32) * e) {-# INLINE toWord32' #-} {-# INLINE toWord32 #-} - toWord64 = liftA toWord64' where+ toWord64 = fmap toWord64' where toWord64' !e = round (fromIntegral (maxBound :: Word64) * e) {-# INLINE toWord64' #-} {-# INLINE toWord64 #-} - toFloat = liftA double2Float+ toFloat = fmap double2Float {-# INLINE toFloat #-} toDouble = id
src/Graphics/Image/ColorSpace/Binary.hs view
@@ -1,5 +1,8 @@-{-# LANGUAGE BangPatterns, DeriveDataTypeable, FlexibleContexts, FlexibleInstances,- TypeFamilies #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE TypeFamilies #-} -- | -- Module : Graphics.Image.ColorSpace.Binary -- Copyright : (c) Alexey Kuleshevich 2016
src/Graphics/Image/ColorSpace/CMYK.hs view
@@ -1,5 +1,8 @@-{-# LANGUAGE BangPatterns, DeriveDataTypeable, FlexibleContexts, FlexibleInstances,- TypeFamilies #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE TypeFamilies #-} -- | -- Module : Graphics.Image.ColorSpace.CMYK -- Copyright : (c) Alexey Kuleshevich 2016
src/Graphics/Image/ColorSpace/Complex.hs view
@@ -34,12 +34,12 @@ {-# INLINE (+:) #-} -- | Extracts the real part of a complex pixel.-realPart :: (ColorSpace cs, RealFloat e) => Pixel cs (Complex e) -> Pixel cs e+realPart :: ColorSpace cs => Pixel cs (Complex e) -> Pixel cs e realPart = liftA C.realPart {-# INLINE realPart #-} -- | Extracts the imaginary part of a complex pixel.-imagPart :: (ColorSpace cs, RealFloat e) => Pixel cs (Complex e) -> Pixel cs e+imagPart :: ColorSpace cs => Pixel cs (Complex e) -> Pixel cs e imagPart = liftA C.imagPart {-# INLINE imagPart #-}
src/Graphics/Image/ColorSpace/Gray.hs view
@@ -1,5 +1,9 @@-{-# LANGUAGE BangPatterns, DeriveDataTypeable, FlexibleContexts, FlexibleInstances,- ScopedTypeVariables, TypeFamilies #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TypeFamilies #-} -- | -- Module : Graphics.Image.ColorSpace.Gray -- Copyright : (c) Alexey Kuleshevich 2016
src/Graphics/Image/ColorSpace/HSI.hs view
@@ -1,5 +1,8 @@-{-# LANGUAGE BangPatterns, DeriveDataTypeable, FlexibleContexts, FlexibleInstances,- TypeFamilies #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE TypeFamilies #-} -- | -- Module : Graphics.Image.ColorSpace.HSI -- Copyright : (c) Alexey Kuleshevich 2016
src/Graphics/Image/ColorSpace/Luma.hs view
@@ -1,5 +1,8 @@-{-# LANGUAGE BangPatterns, DeriveDataTypeable, FlexibleContexts, FlexibleInstances,- TypeFamilies #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE TypeFamilies #-} -- | -- Module : Graphics.Image.ColorSpace.Luma -- Copyright : (c) Alexey Kuleshevich 2016
src/Graphics/Image/ColorSpace/RGB.hs view
@@ -1,5 +1,8 @@-{-# LANGUAGE BangPatterns, DeriveDataTypeable, FlexibleContexts, FlexibleInstances,- TypeFamilies #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE TypeFamilies #-} -- | -- Module : Graphics.Image.ColorSpace.RGB -- Copyright : (c) Alexey Kuleshevich 2016
src/Graphics/Image/ColorSpace/YCbCr.hs view
@@ -1,5 +1,8 @@-{-# LANGUAGE BangPatterns, DeriveDataTypeable, FlexibleContexts, FlexibleInstances,- TypeFamilies #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE TypeFamilies #-} -- | -- Module : Graphics.Image.ColorSpace.YCbCr -- Copyright : (c) Alexey Kuleshevich 2016
src/Graphics/Image/IO.hs view
@@ -1,4 +1,5 @@ {-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} -- | -- Module : Graphics.Image.IO@@ -14,9 +15,18 @@ -- * Writing writeImage, writeImageExact, -- * Displaying- displayImage, setDisplayProgram, + ExternalViewer(..),+ displayImage,+ displayImageUsing,+ displayImageFile,+ -- ** Common viewers+ defaultViewer,+ eogViewer,+ gpicviewViewer,+ fehViewer,+ gimpViewer, -- * Supported Image Formats- module Graphics.Image.IO.External+ module Graphics.Image.IO.Formats -- $supported @@ -24,23 +34,37 @@ import Prelude as P hiding (readFile, writeFile) import qualified Control.Monad as M (foldM)-import Control.Concurrent (forkIO, ThreadId)+++import Control.Concurrent (forkIO) import Data.Char (toLower) import Data.Maybe (fromMaybe)-import Data.IORef-import Data.ByteString (readFile)++import qualified Data.ByteString as B (readFile) import Graphics.Image.ColorSpace import Graphics.Image.Interface import Graphics.Image.IO.Base-import Graphics.Image.IO.External+import Graphics.Image.IO.Formats import qualified Data.ByteString.Lazy as BL (writeFile, hPut)-import System.Exit (ExitCode(ExitSuccess))-import System.FilePath (takeExtension)-import System.IO (Handle, hFlush)-import System.IO.Temp (withSystemTempFile)-import System.Process (waitForProcess, showCommandForUser)+import System.Directory (createDirectoryIfMissing, getTemporaryDirectory)+import System.FilePath (takeExtension, (</>))+import System.IO (hClose, openBinaryTempFile)+import System.Process (readProcess)+import Control.Exception (bracket) +-- | External viewing application to use for displaying images.+data ExternalViewer =+ ExternalViewer FilePath [String] Int+ -- ^ Any custom viewer, which can be specified:+ -- + -- * @FilePath@ - to the actual viewer executable.+ -- * @[String]@ - command line arguments that will be passed to the executable.+ -- * @Int@ - position index in the above list where `FilePath` to an image should be+ -- injected+ deriving Show++ guessFormat :: (ImageFormat f, Enum f) => FilePath -> Maybe f guessFormat path = headMaybe . dropWhile (not . isFormat e) . enumFrom . toEnum $ 0@@ -60,7 +84,7 @@ FilePath -> IO (Either String (Image arr cs Double)) readImage path = do- imgstr <- readFile path+ imgstr <- B.readFile path let maybeFormat = guessFormat path :: Maybe InputFormat formats = enumFrom . toEnum $ 0 orderedFormats = maybe formats (\f -> f:filter (/=f) formats) maybeFormat@@ -93,22 +117,22 @@ -- <#g:4 Supported Image Formats> -> FilePath -- ^ Location of an image. -> IO (Either String img)-readImageExact format path = fmap (decode format) (readFile path)+readImageExact format path = fmap (decode format) (B.readFile path) -- | Just like 'readImage', this function will guess an output file format from the -- extension and write to file any image that is in one of 'Y', 'YA', 'RGB' or--- 'RGBA' 'ColorSpace's with 'Double' precision. While doing necessary+-- 'RGBA' color spaces with 'Double' precision. While doing necessary -- conversions the choice will be given to the most suited color space supported--- by the format, for instance, in case of a 'PNG' format, an ('Image' @arr@--- 'RGBA' 'Double') would be written as 'RGBA'16, hence preserving transparency+-- by the format. For instance, in case of a 'PNG' format, an ('Image' @arr@+-- 'RGBA' 'Double') would be written as @RGBA16@, hence preserving transparency -- and using highest supported precision 'Word16'. At the same time, writing -- that image in 'GIF' format would save it in @RGB8@, since 'Word8' is the -- highest precision 'GIF' supports and it currently cannot be saved with -- transparency.-writeImage :: (ManifestArray arr cs Double, Writable (Image arr cs Double) OutputFormat) =>+writeImage :: Writable (Image arr cs e) OutputFormat => FilePath -- ^ Location where an image should be written.- -> Image arr cs Double -- ^ An image to write. + -> Image arr cs e -- ^ An image to write. -> IO () writeImage path = BL.writeFile path . encode format [] where format = fromMaybe (error ("Could not guess output format. Use 'writeImageExact' "++@@ -132,60 +156,85 @@ writeImageExact format opts path = BL.writeFile path . encode format opts --- | Sets the program to be use when displaying an image, where 'Bool'--- specifies if current thread should block until the program is closed when--- calling 'displayImage' function. GPicView @("gpicview", False)@ is set as a--- default program with a nonblocking flag. Here are some examples:------ >>> setDisplayProgram ("gpicview", True) -- use gpicview and block current thread.--- >>> setDisplayProgram ("gimp", False) -- use gimp and don't block current thread.--- >>> setDisplayProgram ("xv", False)--- >>> setDisplayProgram ("display", False)----setDisplayProgram :: (String, Bool) -> IO ()-setDisplayProgram = writeIORef displayProgram +{- | An image is written as a @.tiff@ file into an operating system's temporary+directory and passed as an argument to the external viewer program. -}+displayImageUsing :: Writable (Image arr cs e) TIF =>+ ExternalViewer -- ^ External viewer to use+ -> Bool -- ^ Should the call be blocking+ -> Image arr cs e -- ^ Image to display+ -> IO ()+displayImageUsing viewer block img = do+ let display = do+ tmpDir <- (</> "hip") <$> getTemporaryDirectory+ createDirectoryIfMissing True tmpDir+ bracket (openBinaryTempFile tmpDir "tmp-img.tiff")+ (hClose . snd)+ (\ (imgPath, imgHandle) -> do+ BL.hPut imgHandle $ encode TIF [] img+ hClose imgHandle+ displayImageFile viewer imgPath)+ if block+ then display+ else forkIO display >> return () -{- | Makes a call to the current display program, which can be changed using-'setDisplayProgram'. An image is written as a @.tiff@ file into an operating-system's temporary directory and passed as an argument to the display-program. If a blocking flag was set to 'False' using 'setDisplayProgram', then-function will return immediately with ('Just' 'ThreadId'), otherwise it will-block current thread until external program is terminated, in which case-'Nothing' is returned. Temporary file is deleted, after a program displaying an-image is closed. +-- | Displays an image file by calling an external image viewer.+displayImageFile :: ExternalViewer -> FilePath -> IO ()+displayImageFile (ExternalViewer exe args ix) imgPath =+ readProcess exe (argsBefore ++ [imgPath] ++ argsAfter) "" >> return ()+ where (argsBefore, argsAfter) = splitAt ix args+++{- | Makes a call to an external viewer that is set as a default image viewer by+the OS. This is a non-blocking function call, so it will take some time before+an image will appear.+ >>> frog <- readImageRGB "images/frog.jpg" >>> displayImage frog- Just ThreadId 505- >>> setDisplayProgram ("gimp", True)- >>> displayImage frog -- will only return after gimp is closed.- Nothing -}-displayImage :: (ManifestArray arr cs e, Writable (Image arr cs e) TIF) =>+displayImage :: Writable (Image arr cs e) TIF => Image arr cs e -- ^ Image to be displayed- -> IO (Maybe ThreadId)-displayImage img = do- (program, block) <- readIORef displayProgram- let displayAction = withSystemTempFile "tmp-img.tiff" (displayUsing img program)- if block- then displayAction >> return Nothing- else Just <$> forkIO displayAction+ -> IO ()+displayImage = displayImageUsing defaultViewer False -displayUsing :: (ManifestArray arr cs e, Writable (Image arr cs e) TIF) =>- Image arr cs e -> String -> FilePath -> Handle -> IO ()-displayUsing img program path h = do- BL.hPut h $ encode TIF [] img- hFlush h- ph <- spawnProcess program [path]- e <- waitForProcess ph- let printExit ExitSuccess = return ()- printExit exitCode = do- putStrLn $ showCommandForUser program [path]- print exitCode- printExit e+defaultViewer :: ExternalViewer+defaultViewer =+#if defined(OS_Win32)+ (ExternalViewer "explorer.exe" [] 0)+#elif defined(OS_Linux)+ (ExternalViewer "xdg-open" [] 0)+#elif defined(OS_Mac)+ (ExternalViewer "open" [] 0)+#else+ error $ "Graphics.Image.IO.defaultViewer: Could not determine default viewer."+#endif+++-- | @eog /tmp/hip/img.tiff@+-- <https://help.gnome.org/users/eog/stable/ Eye of GNOME>+eogViewer :: ExternalViewer+eogViewer = ExternalViewer "eog" [] 0+++-- | @feh --fullscreen --auto-zoom /tmp/hip/img.tiff@+-- <https://feh.finalrewind.org/ FEH>+fehViewer :: ExternalViewer+fehViewer = ExternalViewer "feh" ["--fullscreen", "--auto-zoom"] 2+++-- | @gpicview /tmp/hip/img.tiff@+-- <http://lxde.sourceforge.net/gpicview/ GPicView>+gpicviewViewer :: ExternalViewer+gpicviewViewer = ExternalViewer "gpicview" [] 0+++-- | @gimp /tmp/hip/img.tiff@+-- <https://www.gimp.org/ GIMP>+gimpViewer :: ExternalViewer+gimpViewer = ExternalViewer "gimp" [] 0
src/Graphics/Image/IO/Base.hs view
@@ -1,4 +1,7 @@-{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, TypeFamilies #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE TypeFamilies #-} -- | -- Module : Graphics.Image.IO.Base -- Copyright : (c) Alexey Kuleshevich 2016@@ -9,14 +12,10 @@ -- module Graphics.Image.IO.Base ( ImageFormat(..), Readable(..), Writable(..), Convertible(..),- displayProgram, spawnProcess ) where import qualified Data.ByteString as B (ByteString) import qualified Data.ByteString.Lazy as BL (ByteString)-import Data.IORef-import System.IO.Unsafe (unsafePerformIO)-import System.Process (proc, createProcess, ProcessHandle) -- | Used during converting pixels between libraries.@@ -53,18 +52,3 @@ -- | Encode an image to `BL.ByteString`. encode :: format -> [SaveOption format] -> img -> BL.ByteString----- | Global variable for setting display program.-displayProgram :: IORef (String, Bool)-displayProgram = unsafePerformIO . newIORef $ ("gpicview", False)-{-# NOINLINE displayProgram #-}----- | Implemented here for backwards compatibility with `process < 1.2.0.0`-spawnProcess :: FilePath -> [String] -> IO ProcessHandle-spawnProcess cmd args = do- (_,_,_,p) <- createProcess (proc cmd args)- return p--
− src/Graphics/Image/IO/External.hs
@@ -1,114 +0,0 @@-{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses,- TypeFamilies, UndecidableInstances #-}--- |--- Module : Graphics.Image.IO.External--- Copyright : (c) Alexey Kuleshevich 2016--- License : BSD3--- Maintainer : Alexey Kuleshevich <lehins@yandex.ru>--- Stability : experimental--- Portability : non-portable----module Graphics.Image.IO.External (- module Graphics.Image.IO.External.JuicyPixels,- module Graphics.Image.IO.External.Netpbm,- InputFormat, OutputFormat,- Readable(..), Writable(..), ImageFormat(..),- ) where--import Graphics.Image.Interface-import Graphics.Image.IO.Base-import Graphics.Image.IO.External.JuicyPixels-import Graphics.Image.IO.External.Netpbm----- | A collection of all image formats that can be read into HIP images with--- 'Double' precision pixel channels.-data InputFormat = InputBMP- | InputGIF- | InputHDR- | InputJPG- | InputPNG- | InputTIF- | InputPNM- | InputTGA deriving (Show, Enum, Eq)---instance ImageFormat InputFormat where- data SaveOption InputFormat-- ext InputBMP = ext BMP- ext InputGIF = ext GIF- ext InputHDR = ext HDR- ext InputJPG = ext JPG- ext InputPNG = ext PNG- ext InputTGA = ext TGA- ext InputTIF = ext TIF- ext InputPNM = ext PPM-- exts InputBMP = exts BMP- exts InputGIF = exts GIF- exts InputHDR = exts HDR- exts InputJPG = exts JPG- exts InputPNG = exts PNG- exts InputTGA = exts TGA- exts InputTIF = exts TIF- exts InputPNM = [ext PBM, ext PGM, ext PPM]---instance (Readable (Image arr cs Double) BMP,- Readable (Image arr cs Double) GIF,- Readable (Image arr cs Double) HDR,- Readable (Image arr cs Double) JPG,- Readable (Image arr cs Double) PNG,- Readable (Image arr cs Double) TGA,- Readable (Image arr cs Double) TIF,- Readable (Image arr cs Double) PPM) =>- Readable (Image arr cs Double) InputFormat where- decode InputBMP = decode BMP- decode InputGIF = decode GIF- decode InputHDR = decode HDR- decode InputJPG = decode JPG- decode InputPNG = decode PNG- decode InputTIF = decode TIF- decode InputPNM = decode PPM- decode InputTGA = decode TGA------ | A collection of all image formats that can be written from HIP images with--- 'Double' precision pixel channels.-data OutputFormat = OutputBMP- | OutputGIF- | OutputHDR- | OutputJPG- | OutputPNG- | OutputTIF- | OutputTGA deriving (Show, Enum, Eq)---instance ImageFormat OutputFormat where- data SaveOption OutputFormat- ext OutputBMP = ext BMP- ext OutputGIF = ext GIF- ext OutputHDR = ext HDR- ext OutputJPG = ext JPG- ext OutputPNG = ext PNG- ext OutputTGA = ext TGA- ext OutputTIF = ext TIF---instance (Writable (Image arr cs Double) BMP,- Writable (Image arr cs Double) GIF,- Writable (Image arr cs Double) HDR,- Writable (Image arr cs Double) JPG,- Writable (Image arr cs Double) PNG,- Writable (Image arr cs Double) TGA,- Writable (Image arr cs Double) TIF) =>- Writable (Image arr cs Double) OutputFormat where- encode OutputBMP _ = encode BMP []- encode OutputGIF _ = encode GIF []- encode OutputHDR _ = encode HDR []- encode OutputJPG _ = encode JPG []- encode OutputPNG _ = encode PNG []- encode OutputTGA _ = encode TGA []- encode OutputTIF _ = encode TIF []
− src/Graphics/Image/IO/External/JuicyPixels.hs
@@ -1,1092 +0,0 @@-{-# OPTIONS_GHC -fno-warn-orphans #-}-{-# LANGUAGE BangPatterns, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses,- TypeFamilies, ViewPatterns #-}--- |--- Module : Graphics.Image.IO.External.JuicyPixels--- Copyright : (c) Alexey Kuleshevich 2016--- License : BSD3--- Maintainer : Alexey Kuleshevich <lehins@yandex.ru>--- Stability : experimental--- Portability : non-portable----module Graphics.Image.IO.External.JuicyPixels (- BMP(..),- GIF(..), JP.GifDelay, JP.GifLooping(..), JP.PaletteOptions(..), JP.PaletteCreationMethod(..),- HDR(..),- JPG(..),- PNG(..),- TGA(..),- TIF(..),- SaveOption(..),- ) where--import GHC.Float-import Data.Either-import qualified Data.Monoid as M (mempty)-import Graphics.Image.ColorSpace-import Graphics.Image.Interface hiding (map)-import Graphics.Image.IO.Base-import qualified Data.ByteString as B (ByteString)-import qualified Data.ByteString.Lazy as BL (ByteString)-import qualified Codec.Picture as JP-import qualified Codec.Picture.Jpg as JP-import qualified Codec.Picture.Types as JP-import qualified Codec.Picture.ColorQuant as JP----- | Bitmap image with @.bmp@ extension.-data BMP = BMP--instance ImageFormat BMP where- data SaveOption BMP-- ext _ = ".bmp"----- | Graphics Interchange Format image with @.gif@ extension.-data GIF = GIF--instance ImageFormat GIF where- data SaveOption GIF = GIFPalette JP.PaletteOptions- - ext _ = ".gif"--instance ImageFormat [GIF] where- data SaveOption [GIF] = GIFsPalette JP.PaletteOptions- | GIFsLooping JP.GifLooping-- ext _ = ext GIF---- | High-dynamic-range image with @.hdr@ or @.pic@ extension.-data HDR = HDR--instance ImageFormat HDR where- data SaveOption HDR-- ext _ = ".hdr"-- exts _ = [".hdr", ".pic"]----- | Joint Photographic Experts Group image with @.jpg@ or @.jpeg@ extension.-data JPG = JPG--instance ImageFormat JPG where- data SaveOption JPG = JPGQuality Word8-- ext _ = ".jpg"-- exts _ = [".jpg", ".jpeg"]----- | Portable Network Graphics image with @.png@ extension.-data PNG = PNG--instance ImageFormat PNG where- data SaveOption PNG-- ext _ = ".png"----- | Truevision Graphics Adapter image with .tga extension.-data TGA = TGA--instance ImageFormat TGA where- data SaveOption TGA-- ext _ = ".tga"----- | Tagged Image File Format image with @.tif@ or @.tiff@ extension.-data TIF = TIF--instance ImageFormat TIF where- data SaveOption TIF -- ext _ = ".tif"-- exts _ = [".tif", ".tiff"]-------------------------------------------------------------------------------------- Converting to and from JuicyPixels ------------------------------------------------------------------------------------------------------------------------------- Y -> Y (Double)--instance Convertible JP.Pixel8 (Pixel Y Double) where- convert = toDouble . PixelY--instance Convertible JP.Pixel16 (Pixel Y Double) where- convert = toDouble . PixelY--instance Convertible JP.PixelF (Pixel Y Double) where- convert = toDouble . PixelY--instance Convertible JP.PixelYA8 (Pixel Y Double) where- convert = convert . JP.dropTransparency--instance Convertible JP.PixelYA16 (Pixel Y Double) where- convert = convert . JP.dropTransparency--instance Convertible JP.Pixel8 (Pixel YA Double) where- convert = addAlpha 1 . convert--instance Convertible JP.Pixel16 (Pixel YA Double) where- convert = addAlpha 1 . convert- -instance Convertible JP.PixelF (Pixel YA Double) where- convert = addAlpha 1 . convert--instance Convertible JP.PixelYA8 (Pixel YA Double) where- convert (JP.PixelYA8 y a) = toDouble (PixelYA y a)--instance Convertible JP.PixelYA16 (Pixel YA Double) where- convert (JP.PixelYA16 y a) = toDouble (PixelYA y a)----- Color -> Y (Double)--instance Convertible JP.PixelRGB8 (Pixel Y Double) where- convert = toPixelY . (convert :: JP.PixelRGB8 -> Pixel RGB Double)--instance Convertible JP.PixelRGB16 (Pixel Y Double) where- convert = toPixelY . (convert :: JP.PixelRGB16 -> Pixel RGB Double)--instance Convertible JP.PixelRGBA8 (Pixel Y Double) where- convert = toPixelY . (convert :: JP.PixelRGBA8 -> Pixel RGB Double)--instance Convertible JP.PixelRGBA16 (Pixel Y Double) where- convert = toPixelY . (convert :: JP.PixelRGBA16 -> Pixel RGB Double)--instance Convertible JP.PixelRGBF (Pixel Y Double) where- convert = toPixelY . (convert :: JP.PixelRGBF -> Pixel RGB Double)--instance Convertible JP.PixelCMYK8 (Pixel Y Double) where- convert = toPixelY . toDouble . (convert :: JP.PixelCMYK8 -> Pixel CMYK Word8)--instance Convertible JP.PixelCMYK16 (Pixel Y Double) where- convert = toPixelY . toDouble . (convert :: JP.PixelCMYK16 -> Pixel CMYK Word16)--instance Convertible JP.PixelYCbCr8 (Pixel Y Double) where- convert = convert . JP.computeLuma---- Color -> YA (Double) --instance Convertible JP.PixelRGB8 (Pixel YA Double) where- convert = addAlpha 1 . convert--instance Convertible JP.PixelRGB16 (Pixel YA Double) where- convert = addAlpha 1 . convert- -instance Convertible JP.PixelRGBF (Pixel YA Double) where- convert = addAlpha 1 . convert- -instance Convertible JP.PixelCMYK8 (Pixel YA Double) where- convert = addAlpha 1 . convert--instance Convertible JP.PixelCMYK16 (Pixel YA Double) where- convert = addAlpha 1 . convert- -instance Convertible JP.PixelYCbCr8 (Pixel YA Double) where- convert = addAlpha 1 . convert--instance Convertible JP.PixelRGBA8 (Pixel YA Double) where- convert = toPixelYA . (convert :: JP.PixelRGBA8 -> Pixel RGBA Double)--instance Convertible JP.PixelRGBA16 (Pixel YA Double) where- convert = toPixelYA . (convert :: JP.PixelRGBA16 -> Pixel RGBA Double)- - ---- Y -> RGB (Double)--instance Convertible JP.Pixel8 (Pixel RGB Double) where- convert = toDouble . fromChannel--instance Convertible JP.Pixel16 (Pixel RGB Double) where- convert = toDouble . fromChannel--instance Convertible JP.PixelF (Pixel RGB Double) where- convert = toDouble . fromChannel--instance Convertible JP.PixelYA8 (Pixel RGB Double) where- convert = convert . JP.dropTransparency--instance Convertible JP.PixelYA16 (Pixel RGB Double) where- convert = convert . JP.dropTransparency---- Color -> RGB (Double)--instance Convertible JP.PixelRGB8 (Pixel RGB Double) where- convert (JP.PixelRGB8 r g b) = toDouble $ PixelRGB r g b--instance Convertible JP.PixelRGB16 (Pixel RGB Double) where- convert (JP.PixelRGB16 r g b) = toDouble $ PixelRGB r g b--instance Convertible JP.PixelRGBA8 (Pixel RGB Double) where- convert = convert . JP.dropTransparency--instance Convertible JP.PixelRGBA16 (Pixel RGB Double) where- convert = convert . JP.dropTransparency--instance Convertible JP.PixelRGBF (Pixel RGB Double) where- convert (JP.PixelRGBF r g b) = - PixelRGB (float2Double r) (float2Double g) (float2Double b)--instance Convertible JP.PixelYCbCr8 (Pixel RGB Double) where- convert = convert . (JP.convertPixel :: JP.PixelYCbCr8 -> JP.PixelRGB8)--instance Convertible JP.PixelCMYK8 (Pixel RGB Double) where- convert = convert . (JP.convertPixel :: JP.PixelCMYK8 -> JP.PixelRGB8)--instance Convertible JP.PixelCMYK16 (Pixel RGB Double) where- convert = convert . (JP.convertPixel :: JP.PixelCMYK16 -> JP.PixelRGB16)---- Y -> RGBA (Double)--instance Convertible JP.Pixel8 (Pixel RGBA Double) where- convert = addAlpha 1 . convert--instance Convertible JP.Pixel16 (Pixel RGBA Double) where- convert = addAlpha 1 . convert--instance Convertible JP.PixelF (Pixel RGBA Double) where- convert = addAlpha 1 . convert--instance Convertible JP.PixelYA8 (Pixel RGBA Double) where- convert = toPixelRGBA . (convert :: JP.PixelYA8 -> Pixel YA Double)--instance Convertible JP.PixelYA16 (Pixel RGBA Double) where- convert = toPixelRGBA . (convert :: JP.PixelYA16 -> Pixel YA Double)---- Color -> RGBA (Double)--instance Convertible JP.PixelRGB8 (Pixel RGBA Double) where- convert = addAlpha 1 . convert- -instance Convertible JP.PixelRGB16 (Pixel RGBA Double) where- convert = addAlpha 1 . convert--instance Convertible JP.PixelRGBF (Pixel RGBA Double) where- convert = addAlpha 1 . convert--instance Convertible JP.PixelCMYK8 (Pixel RGBA Double) where- convert = addAlpha 1 . convert- -instance Convertible JP.PixelCMYK16 (Pixel RGBA Double) where- convert = addAlpha 1 . convert--instance Convertible JP.PixelYCbCr8 (Pixel RGBA Double) where- convert = addAlpha 1 . convert- -instance Convertible JP.PixelRGBA8 (Pixel RGBA Double) where- convert (JP.PixelRGBA8 r g b a) = toDouble $ PixelRGBA r g b a- -instance Convertible JP.PixelRGBA16 (Pixel RGBA Double) where- convert (JP.PixelRGBA16 r g b a) = toDouble $ PixelRGBA r g b a------- to JuicyPixels ----------- Exact precision conversions--instance Convertible JP.Pixel8 (Pixel Y Word8) where- convert = PixelY- -instance Convertible JP.Pixel16 (Pixel Y Word16) where- convert = PixelY--instance Convertible JP.Pixel32 (Pixel Y Word32) where- convert = PixelY--instance Convertible JP.PixelF (Pixel Y Float) where- convert = PixelY--instance Convertible JP.PixelYA8 (Pixel YA Word8) where- convert (JP.PixelYA8 g a) = PixelYA g a- -instance Convertible JP.PixelYA16 (Pixel YA Word16) where- convert (JP.PixelYA16 g a) = PixelYA g a--instance Convertible JP.PixelRGB8 (Pixel RGB Word8) where- convert (JP.PixelRGB8 r g b) = PixelRGB r g b- -instance Convertible JP.PixelRGB16 (Pixel RGB Word16) where- convert (JP.PixelRGB16 r g b) = PixelRGB r g b--instance Convertible JP.PixelRGBF (Pixel RGB Float) where- convert (JP.PixelRGBF r g b) = PixelRGB r g b--instance Convertible JP.PixelRGBA8 (Pixel RGBA Word8) where- convert (JP.PixelRGBA8 r g b a) = PixelRGBA r g b a- -instance Convertible JP.PixelRGBA16 (Pixel RGBA Word16) where- convert (JP.PixelRGBA16 r g b a) = PixelRGBA r g b a--instance Convertible JP.PixelYCbCr8 (Pixel YCbCr Word8) where- convert (JP.PixelYCbCr8 y cb cr) = PixelYCbCr y cb cr--instance Convertible JP.PixelCMYK8 (Pixel CMYK Word8) where- convert (JP.PixelCMYK8 c m y k) = PixelCMYK c m y k--instance Convertible JP.PixelCMYK16 (Pixel CMYK Word16) where- convert (JP.PixelCMYK16 c m y k) = PixelCMYK c m y k----instance Convertible (Pixel Y Word8) JP.Pixel8 where- convert (PixelY g) = g- -instance Convertible (Pixel Y Word16) JP.Pixel16 where- convert (PixelY g) = g--instance Convertible (Pixel Y Word32) JP.Pixel32 where- convert (PixelY g) = g--instance Convertible (Pixel Y Float) JP.PixelF where- convert (PixelY g) = g--instance Convertible (Pixel YA Word8) JP.PixelYA8 where- convert (PixelYA g a) = JP.PixelYA8 g a- -instance Convertible (Pixel YA Word16) JP.PixelYA16 where- convert (PixelYA g a) = JP.PixelYA16 g a--instance Convertible (Pixel RGB Word8) JP.PixelRGB8 where- convert (PixelRGB r g b) = JP.PixelRGB8 r g b- -instance Convertible (Pixel RGB Word16) JP.PixelRGB16 where- convert (PixelRGB r g b) = JP.PixelRGB16 r g b--instance Convertible (Pixel RGB Float) JP.PixelRGBF where- convert (PixelRGB r g b) = JP.PixelRGBF r g b--instance Convertible (Pixel RGBA Word8) JP.PixelRGBA8 where- convert (PixelRGBA r g b a) = JP.PixelRGBA8 r g b a- -instance Convertible (Pixel RGBA Word16) JP.PixelRGBA16 where- convert (PixelRGBA r g b a) = JP.PixelRGBA16 r g b a---instance Convertible (Pixel YCbCr Word8) JP.PixelYCbCr8 where- convert (PixelYCbCr y cb cr) = JP.PixelYCbCr8 y cb cr--instance Convertible (Pixel CMYK Word8) JP.PixelCMYK8 where- convert (PixelCMYK c m y k) = JP.PixelCMYK8 c m y k--instance Convertible (Pixel CMYK Word16) JP.PixelCMYK16 where- convert (PixelCMYK c m y k) = JP.PixelCMYK16 c m y k--------------------------------------------------------------------------------------- Decoding images using JuicyPixels -------------------------------------------------------------------------------------------------------------------------------- BMP Format Reading--instance (Array arr Y Word8, Array arr Binary Bit) => Readable (Image arr Binary Bit) BMP where- decode _ = either Left (Right . toImageBinary) . jpImageY8ToImage . JP.decodeBitmap--instance Array arr Y Word8 => Readable (Image arr Y Word8) BMP where- decode _ = jpImageY8ToImage . JP.decodeBitmap--instance Array arr RGB Word8 => Readable (Image arr RGB Word8) BMP where- decode _ = jpImageRGB8ToImage . JP.decodeBitmap--instance Array arr RGBA Word8 => Readable (Image arr RGBA Word8) BMP where- decode _ = jpImageRGBA8ToImage . JP.decodeBitmap--instance Array arr Y Double => Readable (Image arr Y Double) BMP where- decode _ = jpDynamicImageToImage . JP.decodeBitmap--instance Array arr YA Double => Readable (Image arr YA Double) BMP where- decode _ = jpDynamicImageToImage . JP.decodeBitmap--instance Array arr RGB Double => Readable (Image arr RGB Double) BMP where- decode _ = jpDynamicImageToImage . JP.decodeBitmap--instance Array arr RGBA Double => Readable (Image arr RGBA Double) BMP where- decode _ = jpDynamicImageToImage . JP.decodeBitmap----- GIF Format Reading--instance Array arr RGB Word8 => Readable (Image arr RGB Word8) GIF where- decode _ = jpImageRGB8ToImage . JP.decodeGif--instance Array arr RGBA Word8 => Readable (Image arr RGBA Word8) GIF where- decode _ = jpImageRGBA8ToImage . JP.decodeGif--instance Array arr Y Double => Readable (Image arr Y Double) GIF where- decode _ = jpDynamicImageToImage . JP.decodeGif--instance Array arr YA Double => Readable (Image arr YA Double) GIF where- decode _ = jpDynamicImageToImage . JP.decodeGif--instance Array arr RGB Double => Readable (Image arr RGB Double) GIF where- decode _ = jpDynamicImageToImage . JP.decodeGif--instance Array arr RGBA Double => Readable (Image arr RGBA Double) GIF where- decode _ = jpDynamicImageToImage . JP.decodeGif---- List of GIF Format frames Reading--decodeGifs :: (Either String JP.DynamicImage -> Either String img)- -> B.ByteString -> Either String [img]-decodeGifs decoder = either Left decodeLS . JP.decodeGifImages where- decodeLS ls = if null errs then Right imgs else Left $ unlines errs where- (errs, imgs) = partitionEithers $ map (decoder . Right) ls--instance Array arr RGB Word8 => Readable [Image arr RGB Word8] [GIF] where- decode _ = decodeGifs jpImageRGB8ToImage--instance Array arr RGBA Word8 => Readable [Image arr RGBA Word8] [GIF] where- decode _ = decodeGifs jpImageRGBA8ToImage--instance Array arr Y Double => Readable [Image arr Y Double] [GIF] where- decode _ = decodeGifs jpDynamicImageToImage--instance Array arr YA Double => Readable [Image arr YA Double] [GIF] where- decode _ = decodeGifs jpDynamicImageToImage--instance Array arr RGB Double => Readable [Image arr RGB Double] [GIF] where- decode _ = decodeGifs jpDynamicImageToImage--instance Array arr RGBA Double => Readable [Image arr RGBA Double] [GIF] where- decode _ = decodeGifs jpDynamicImageToImage- ----- HDR Format Reading--instance Array arr RGB Float => Readable (Image arr RGB Float) HDR where- decode _ = jpImageRGBFToImage . JP.decodeHDR--instance Array arr Y Double => Readable (Image arr Y Double) HDR where- decode _ = jpDynamicImageToImage . JP.decodeHDR--instance Array arr YA Double => Readable (Image arr YA Double) HDR where- decode _ = jpDynamicImageToImage . JP.decodeHDR--instance Array arr RGB Double => Readable (Image arr RGB Double) HDR where- decode _ = jpDynamicImageToImage . JP.decodeHDR--instance Array arr RGBA Double => Readable (Image arr RGBA Double) HDR where- decode _ = jpDynamicImageToImage . JP.decodeHDR----- JPG Format Reading--instance Array arr Y Word8 => Readable (Image arr Y Word8) JPG where- decode _ = jpImageY8ToImage . JP.decodeJpeg--instance Array arr YA Word8 => Readable (Image arr YA Word8) JPG where- decode _ = jpImageYA8ToImage . JP.decodeJpeg--instance Array arr RGB Word8 => Readable (Image arr RGB Word8) JPG where- decode _ = jpImageRGB8ToImage . JP.decodeJpeg--instance Array arr CMYK Word8 => Readable (Image arr CMYK Word8) JPG where- decode _ = jpImageCMYK8ToImage . JP.decodeJpeg--instance Array arr YCbCr Word8 => Readable (Image arr YCbCr Word8) JPG where- decode _ = jpImageYCbCr8ToImage . JP.decodeJpeg--instance Array arr Y Double => Readable (Image arr Y Double) JPG where- decode _ = jpDynamicImageToImage . JP.decodeJpeg--instance Array arr YA Double => Readable (Image arr YA Double) JPG where- decode _ = jpDynamicImageToImage . JP.decodeJpeg--instance Array arr RGB Double => Readable (Image arr RGB Double) JPG where- decode _ = jpDynamicImageToImage . JP.decodeJpeg--instance Array arr RGBA Double => Readable (Image arr RGBA Double) JPG where- decode _ = jpDynamicImageToImage . JP.decodeJpeg----- PNG Format Reading--instance (Array arr Y Word8, Array arr Binary Bit) => Readable (Image arr Binary Bit) PNG where- decode _ = fmap toImageBinary . jpImageY8ToImage . JP.decodePng--instance Array arr Y Word8 => Readable (Image arr Y Word8) PNG where- decode _ = jpImageY8ToImage . JP.decodePng--instance Array arr Y Word16 => Readable (Image arr Y Word16) PNG where- decode _ = jpImageY16ToImage . JP.decodePng--instance Array arr YA Word8 => Readable (Image arr YA Word8) PNG where- decode _ = jpImageYA8ToImage . JP.decodePng--instance Array arr YA Word16 => Readable (Image arr YA Word16) PNG where- decode _ = jpImageYA16ToImage . JP.decodePng--instance Array arr RGB Word8 => Readable (Image arr RGB Word8) PNG where- decode _ = jpImageRGB8ToImage . JP.decodePng--instance Array arr RGB Word16 => Readable (Image arr RGB Word16) PNG where- decode _ = jpImageRGB16ToImage . JP.decodePng--instance Array arr RGBA Word8 => Readable (Image arr RGBA Word8) PNG where- decode _ = jpImageRGBA8ToImage . JP.decodePng--instance Array arr RGBA Word16 => Readable (Image arr RGBA Word16) PNG where- decode _ = jpImageRGBA16ToImage . JP.decodePng--instance Array arr Y Double => Readable (Image arr Y Double) PNG where- decode _ = jpDynamicImageToImage . JP.decodePng--instance Array arr YA Double => Readable (Image arr YA Double) PNG where- decode _ = jpDynamicImageToImage . JP.decodePng--instance Array arr RGB Double => Readable (Image arr RGB Double) PNG where- decode _ = jpDynamicImageToImage . JP.decodePng--instance Array arr RGBA Double => Readable (Image arr RGBA Double) PNG where- decode _ = jpDynamicImageToImage . JP.decodePng----- TGA Format Reading--instance (Array arr Y Word8, Array arr Binary Bit) => Readable (Image arr Binary Bit) TGA where- decode _ = fmap toImageBinary . jpImageY8ToImage . JP.decodeTga--instance Array arr Y Word8 => Readable (Image arr Y Word8) TGA where- decode _ = jpImageY8ToImage . JP.decodeTga--instance Array arr RGB Word8 => Readable (Image arr RGB Word8) TGA where- decode _ = jpImageRGB8ToImage . JP.decodeTga--instance Array arr RGBA Word8 => Readable (Image arr RGBA Word8) TGA where- decode _ = jpImageRGBA8ToImage . JP.decodeTga--instance Array arr Y Double => Readable (Image arr Y Double) TGA where- decode _ = jpDynamicImageToImage . JP.decodeTga--instance Array arr YA Double => Readable (Image arr YA Double) TGA where- decode _ = jpDynamicImageToImage . JP.decodeTga--instance Array arr RGB Double => Readable (Image arr RGB Double) TGA where- decode _ = jpDynamicImageToImage . JP.decodeTga--instance Array arr RGBA Double => Readable (Image arr RGBA Double) TGA where- decode _ = jpDynamicImageToImage . JP.decodeTga----- TIF Format Reading--instance (Array arr Y Word8, Array arr Binary Bit) => Readable (Image arr Binary Bit) TIF where- decode _ = fmap toImageBinary . jpImageY8ToImage . JP.decodeTiff--instance Array arr Y Word8 => Readable (Image arr Y Word8) TIF where- decode _ = jpImageY8ToImage . JP.decodeTiff--instance Array arr Y Word16 => Readable (Image arr Y Word16) TIF where- decode _ = jpImageY16ToImage . JP.decodeTiff--instance Array arr YA Word8 => Readable (Image arr YA Word8) TIF where- decode _ = jpImageYA8ToImage . JP.decodeTiff--instance Array arr YA Word16 => Readable (Image arr YA Word16) TIF where- decode _ = jpImageYA16ToImage . JP.decodeTiff--instance Array arr RGB Word8 => Readable (Image arr RGB Word8) TIF where- decode _ = jpImageRGB8ToImage . JP.decodeTiff--instance Array arr RGB Word16 => Readable (Image arr RGB Word16) TIF where- decode _ = jpImageRGB16ToImage . JP.decodeTiff--instance Array arr RGBA Word8 => Readable (Image arr RGBA Word8) TIF where- decode _ = jpImageRGBA8ToImage . JP.decodeTiff--instance Array arr RGBA Word16 => Readable (Image arr RGBA Word16) TIF where- decode _ = jpImageRGBA16ToImage . JP.decodeTiff--instance Array arr CMYK Word8 => Readable (Image arr CMYK Word8) TIF where- decode _ = jpImageCMYK8ToImage . JP.decodeTiff--instance Array arr CMYK Word16 => Readable (Image arr CMYK Word16) TIF where- decode _ = jpImageCMYK16ToImage . JP.decodeTiff---instance Array arr Y Double => Readable (Image arr Y Double) TIF where- decode _ = jpDynamicImageToImage . JP.decodeTiff--instance Array arr YA Double => Readable (Image arr YA Double) TIF where- decode _ = jpDynamicImageToImage . JP.decodeTiff--instance Array arr RGB Double => Readable (Image arr RGB Double) TIF where- decode _ = jpDynamicImageToImage . JP.decodeTiff--instance Array arr RGBA Double => Readable (Image arr RGBA Double) TIF where- decode _ = jpDynamicImageToImage . JP.decodeTiff------ General decoding and helper functions--jpImageToImage :: (Array arr cs e, Convertible jpx (Pixel cs e), JP.Pixel jpx) =>- JP.Image jpx -> Image arr cs e-jpImageToImage jimg = makeImage (JP.imageHeight jimg, JP.imageWidth jimg) getPx- where getPx (y, x) = convert $ JP.pixelAt jimg x y---jpImageY8ToImage :: Array arr Y Word8 =>- Either String JP.DynamicImage -> Either String (Image arr Y Word8)-jpImageY8ToImage (Right (JP.ImageY8 jimg)) = Right (jpImageToImage jimg)-jpImageY8ToImage jimg = jpCSError "Y8 (Pixel Y Word8)" jimg---jpImageY16ToImage :: Array arr Y Word16 =>- Either String JP.DynamicImage -> Either String (Image arr Y Word16)-jpImageY16ToImage (Right (JP.ImageY16 jimg)) = Right (jpImageToImage jimg)-jpImageY16ToImage jimg = jpCSError "Y16 (Pixel Y Word16)" jimg--{- -- No JuicyPixels images are actually read in this type-jpImageYFToImage :: Array arr Y Float =>- Either String JP.DynamicImage -> Either String (Image arr Y Float)-jpImageYFToImage (Right (JP.ImageYF jimg)) = Right (jpImageToImage jimg)-jpImageYFToImage jimg = jpCSError "YF (Pixel Y Float)" jimg--}--jpImageYA8ToImage :: Array arr YA Word8 =>- Either String JP.DynamicImage -> Either String (Image arr YA Word8)-jpImageYA8ToImage (Right (JP.ImageYA8 jimg)) = Right (jpImageToImage jimg)-jpImageYA8ToImage jimg = jpCSError "YA8 (Pixel YA Word8)" jimg---jpImageYA16ToImage :: Array arr YA Word16 =>- Either String JP.DynamicImage -> Either String (Image arr YA Word16)-jpImageYA16ToImage (Right (JP.ImageYA16 jimg)) = Right (jpImageToImage jimg)-jpImageYA16ToImage jimg = jpCSError "YA16 (Pixel YA Word16)" jimg---jpImageRGB8ToImage :: Array arr RGB Word8 =>- Either String JP.DynamicImage -> Either String (Image arr RGB Word8)-jpImageRGB8ToImage (Right (JP.ImageRGB8 jimg)) = Right (jpImageToImage jimg)-jpImageRGB8ToImage jimg = jpCSError "RGB8 (Pixel RGB Word8)" jimg---jpImageRGB16ToImage :: Array arr RGB Word16 =>- Either String JP.DynamicImage -> Either String (Image arr RGB Word16)-jpImageRGB16ToImage (Right (JP.ImageRGB16 jimg)) = Right (jpImageToImage jimg)-jpImageRGB16ToImage jimg = jpCSError "RGB16 (Pixel RGB Word16)" jimg---jpImageRGBFToImage :: Array arr RGB Float =>- Either String JP.DynamicImage -> Either String (Image arr RGB Float)-jpImageRGBFToImage (Right (JP.ImageRGBF jimg)) = Right (jpImageToImage jimg)-jpImageRGBFToImage jimg = jpCSError "RGBF (Pixel RGB Float)" jimg---jpImageRGBA8ToImage :: Array arr RGBA Word8 =>- Either String JP.DynamicImage -> Either String (Image arr RGBA Word8)-jpImageRGBA8ToImage (Right (JP.ImageRGBA8 jimg)) = Right (jpImageToImage jimg)-jpImageRGBA8ToImage jimg = jpCSError "RGBA8 (Pixel RGBA Word8)" jimg---jpImageRGBA16ToImage :: Array arr RGBA Word16 =>- Either String JP.DynamicImage -> Either String (Image arr RGBA Word16)-jpImageRGBA16ToImage (Right (JP.ImageRGBA16 jimg)) = Right (jpImageToImage jimg)-jpImageRGBA16ToImage jimg = jpCSError "RGBA16 (Pixel RGBA Word16)" jimg---jpImageYCbCr8ToImage :: Array arr YCbCr Word8 =>- Either String JP.DynamicImage -> Either String (Image arr YCbCr Word8)-jpImageYCbCr8ToImage (Right (JP.ImageYCbCr8 jimg)) = Right (jpImageToImage jimg)-jpImageYCbCr8ToImage jimg = jpCSError "YCbCr8 (Pixel YCbCr Word8)" jimg---jpImageCMYK8ToImage :: Array arr CMYK Word8 =>- Either String JP.DynamicImage -> Either String (Image arr CMYK Word8)-jpImageCMYK8ToImage (Right (JP.ImageCMYK8 jimg)) = Right (jpImageToImage jimg)-jpImageCMYK8ToImage jimg = jpCSError "CMYK8 (Pixel CMYK Word8)" jimg---jpImageCMYK16ToImage :: Array arr CMYK Word16 =>- Either String JP.DynamicImage -> Either String (Image arr CMYK Word16)-jpImageCMYK16ToImage (Right (JP.ImageCMYK16 jimg)) = Right (jpImageToImage jimg)-jpImageCMYK16ToImage jimg = jpCSError "CMYK16 (Pixel CMYK Word16)" jimg---jpDynamicImageToImage' :: (Convertible JP.PixelCMYK16 (Pixel cs e),- Convertible JP.PixelCMYK8 (Pixel cs e),- Convertible JP.PixelRGB16 (Pixel cs e),- Convertible JP.PixelRGB8 (Pixel cs e),- Convertible JP.PixelRGBA16 (Pixel cs e),- Convertible JP.PixelRGBA8 (Pixel cs e),- Convertible JP.PixelRGBF (Pixel cs e),- Convertible JP.PixelYA16 (Pixel cs e),- Convertible JP.PixelYA8 (Pixel cs e),- Convertible JP.PixelYCbCr8 (Pixel cs e),- Convertible JP.Pixel16 (Pixel cs e),- Convertible JP.Pixel8 (Pixel cs e),- Convertible JP.PixelF (Pixel cs e),- Array arr cs e) =>- JP.DynamicImage -> Image arr cs e-jpDynamicImageToImage' (JP.ImageY8 jimg) = jpImageToImage jimg-jpDynamicImageToImage' (JP.ImageY16 jimg) = jpImageToImage jimg-jpDynamicImageToImage' (JP.ImageYF jimg) = jpImageToImage jimg-jpDynamicImageToImage' (JP.ImageYA8 jimg) = jpImageToImage jimg-jpDynamicImageToImage' (JP.ImageYA16 jimg) = jpImageToImage jimg-jpDynamicImageToImage' (JP.ImageRGB8 jimg) = jpImageToImage jimg-jpDynamicImageToImage' (JP.ImageRGB16 jimg) = jpImageToImage jimg-jpDynamicImageToImage' (JP.ImageRGBF jimg) = jpImageToImage jimg-jpDynamicImageToImage' (JP.ImageRGBA8 jimg) = jpImageToImage jimg-jpDynamicImageToImage' (JP.ImageRGBA16 jimg) = jpImageToImage jimg-jpDynamicImageToImage' (JP.ImageYCbCr8 jimg) = jpImageToImage jimg-jpDynamicImageToImage' (JP.ImageCMYK8 jimg) = jpImageToImage jimg-jpDynamicImageToImage' (JP.ImageCMYK16 jimg) = jpImageToImage jimg---jpDynamicImageToImage :: (Convertible JP.PixelCMYK16 (Pixel cs e),- Convertible JP.PixelCMYK8 (Pixel cs e),- Convertible JP.PixelRGB16 (Pixel cs e),- Convertible JP.PixelRGB8 (Pixel cs e),- Convertible JP.PixelRGBA16 (Pixel cs e),- Convertible JP.PixelRGBA8 (Pixel cs e),- Convertible JP.PixelRGBF (Pixel cs e),- Convertible JP.PixelYA16 (Pixel cs e),- Convertible JP.PixelYA8 (Pixel cs e),- Convertible JP.PixelYCbCr8 (Pixel cs e),- Convertible JP.Pixel16 (Pixel cs e),- Convertible JP.Pixel8 (Pixel cs e),- Convertible JP.PixelF (Pixel cs e), Array arr cs e) =>- Either String JP.DynamicImage -> Either String (Image arr cs e)-jpDynamicImageToImage = either jpError (Right . jpDynamicImageToImage')---jpImageShowCS :: JP.DynamicImage -> String-jpImageShowCS (JP.ImageY8 _) = "Y8 (Pixel Y Word8)"-jpImageShowCS (JP.ImageY16 _) = "Y16 (Pixel Y Word16)"-jpImageShowCS (JP.ImageYF _) = "YF (Pixel Y Float)"-jpImageShowCS (JP.ImageYA8 _) = "YA8 (Pixel YA Word8)"-jpImageShowCS (JP.ImageYA16 _) = "YA16 (Pixel YA Word16)"-jpImageShowCS (JP.ImageRGB8 _) = "RGB8 (Pixel RGB Word8)"-jpImageShowCS (JP.ImageRGB16 _) = "RGB16 (Pixel RGB Word16)"-jpImageShowCS (JP.ImageRGBF _) = "RGBF (Pixel RGB Float)"-jpImageShowCS (JP.ImageRGBA8 _) = "RGBA8 (Pixel RGBA Word8)"-jpImageShowCS (JP.ImageRGBA16 _) = "RGBA16 (Pixel RGBA Word16)"-jpImageShowCS (JP.ImageYCbCr8 _) = "YCbCr8 (Pixel YCbCr Word8)"-jpImageShowCS (JP.ImageCMYK8 _) = "CMYK8 (Pixel CMYK Word8)"-jpImageShowCS (JP.ImageCMYK16 _) = "CMYK16 (Pixel CMYK Word16)"---jpError :: String -> Either String a-jpError err = Left ("JuicyPixel decoding error: "++err)---jpCSError :: String -> Either String JP.DynamicImage -> Either String a-jpCSError _ (Left err) = jpError err-jpCSError cs (Right jimg) = jpError ("Input image is in "++(jpImageShowCS jimg)++- ", cannot convert it to "++cs++" colorspace.")-------------------------------------------------------------------------------------- Encoding images using JuicyPixels ------------------------------------------------------------------------------------------------------------------------------instance ManifestArray arr Y Word8 => Writable (Image arr Y Word8) BMP where- encode _ _ = JP.encodeBitmap . imageToJPImage (convert :: Pixel Y Word8 -> JP.Pixel8) --instance ManifestArray arr RGB Word8 => Writable (Image arr RGB Word8) BMP where- encode _ _ = JP.encodeBitmap . imageToJPImage (convert :: Pixel RGB Word8 -> JP.PixelRGB8) --instance ManifestArray arr RGBA Word8 => Writable (Image arr RGBA Word8) BMP where- encode _ _ = JP.encodeBitmap . imageToJPImage (convert :: Pixel RGBA Word8 -> JP.PixelRGBA8) --instance ManifestArray arr Binary Bit => Writable (Image arr Binary Bit) BMP where- encode _ _ = JP.encodeBitmap . imageToJPImage ((convert :: Pixel Y Word8 -> JP.Pixel8)- . fromPixelBinary)--instance ManifestArray arr Y Double => Writable (Image arr Y Double) BMP where- encode _ _ = JP.encodeBitmap . imageToJPImage ((convert :: Pixel Y Word8 -> JP.Pixel8)- . toWord8)--instance ManifestArray arr YA Double => Writable (Image arr YA Double) BMP where- encode _ _ = JP.encodeBitmap . imageToJPImage ((convert :: Pixel Y Word8 -> JP.Pixel8)- . toWord8 . dropAlpha)--instance ManifestArray arr RGB Double => Writable (Image arr RGB Double) BMP where- encode _ _ = JP.encodeBitmap . imageToJPImage ((convert :: Pixel RGB Word8 -> JP.PixelRGB8)- . toWord8)--instance ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) BMP where- encode _ _ = JP.encodeBitmap . imageToJPImage ((convert :: Pixel RGBA Word8 -> JP.PixelRGBA8)- . toWord8)---- Writable GIF--encodeGIF :: ManifestArray arr cs e =>- [SaveOption GIF] -> (Pixel cs e -> JP.PixelRGB8)- -> Image arr cs e -> BL.ByteString-encodeGIF [] !conv =- either error id . uncurry JP.encodeGifImageWithPalette .- JP.palettize JP.defaultPaletteOptions . imageToJPImage conv-encodeGIF (GIFPalette palOpts:_) !conv =- either error id . uncurry JP.encodeGifImageWithPalette .- JP.palettize palOpts . imageToJPImage conv---instance ManifestArray arr RGB Word8 => Writable (Image arr RGB Word8) GIF where- encode _ opts = encodeGIF opts (convert :: Pixel RGB Word8 -> JP.PixelRGB8)- -instance ManifestArray arr Y Double => Writable (Image arr Y Double) GIF where- encode _ opts = encodeGIF opts ((convert :: Pixel RGB Word8 -> JP.PixelRGB8)- . toWord8 . toPixelRGB)- -instance ManifestArray arr YA Double => Writable (Image arr YA Double) GIF where- encode _ opts = encodeGIF opts ((convert :: Pixel RGB Word8 -> JP.PixelRGB8)- . toWord8 . toPixelRGB . dropAlpha)--instance ManifestArray arr RGB Double => Writable (Image arr RGB Double) GIF where- encode _ opts = encodeGIF opts ((convert :: Pixel RGB Word8 -> JP.PixelRGB8)- . toWord8)--instance ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) GIF where- encode _ opts = encodeGIF opts ((convert :: Pixel RGB Word8 -> JP.PixelRGB8)- . toWord8 . dropAlpha)---encodeGIFs :: ManifestArray arr cs e =>- [SaveOption [GIF]] -> (Pixel cs e -> JP.PixelRGB8)- -> [(JP.GifDelay, Image arr cs e)] -> BL.ByteString-encodeGIFs !opts !conv =- either error id . JP.encodeGifImages (getGIFsLoop opts) . map palletizeGif where- getGIFsLoop [] = JP.LoopingNever- getGIFsLoop (GIFsLooping loop:_) = loop- getGIFsLoop (_:xs) = getGIFsLoop xs - getGIFsPal [] = JP.defaultPaletteOptions- getGIFsPal (GIFsPalette palOpts:_) = palOpts- getGIFsPal (_:xs) = getGIFsPal xs- palletizeGif !(d, img) = (p, d, jimg) where - !(jimg, p) = JP.palettize (getGIFsPal opts) $ imageToJPImage conv img---instance ManifestArray arr RGB Word8 => Writable [(JP.GifDelay, Image arr RGB Word8)] [GIF] where- encode _ opts = encodeGIFs opts (convert :: Pixel RGB Word8 -> JP.PixelRGB8)--instance ManifestArray arr RGB Double => Writable [(JP.GifDelay, Image arr RGB Double)] [GIF] where- encode _ opts = encodeGIFs opts ((convert :: Pixel RGB Word8 -> JP.PixelRGB8)- . toWord8)---- Writable HDR--instance ManifestArray arr RGB Float => Writable (Image arr RGB Float) HDR where- encode _ _ = JP.encodeHDR . imageToJPImage (convert :: Pixel RGB Float -> JP.PixelRGBF) --instance ManifestArray arr Y Double => Writable (Image arr Y Double) HDR where- encode _ _ = JP.encodeHDR . imageToJPImage ((convert :: Pixel RGB Float -> JP.PixelRGBF)- . toFloat . toPixelRGB)--instance ManifestArray arr YA Double => Writable (Image arr YA Double) HDR where- encode _ _ = JP.encodeHDR . imageToJPImage ((convert :: Pixel RGB Float -> JP.PixelRGBF)- . toFloat . toPixelRGB . dropAlpha)--instance ManifestArray arr RGB Double => Writable (Image arr RGB Double) HDR where- encode _ _ = JP.encodeHDR . imageToJPImage ((convert :: Pixel RGB Float -> JP.PixelRGBF)- . toFloat)--instance ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) HDR where- encode _ _ = JP.encodeHDR . imageToJPImage ((convert :: Pixel RGB Float -> JP.PixelRGBF)- . toFloat . dropAlpha)- ---- Writable JPG---encodeJPG :: (JP.JpgEncodable px, ManifestArray arr cs e) =>- [SaveOption JPG] -> (Pixel cs e -> px) -> Image arr cs e -> BL.ByteString-encodeJPG [] conv =- JP.encodeDirectJpegAtQualityWithMetadata 100 M.mempty . imageToJPImage conv-encodeJPG (JPGQuality q:_) conv =- JP.encodeDirectJpegAtQualityWithMetadata q M.mempty . imageToJPImage conv---instance ManifestArray arr Y Word8 => Writable (Image arr Y Word8) JPG where- encode _ opts = encodeJPG opts (convert :: Pixel Y Word8 -> JP.Pixel8)--instance ManifestArray arr RGB Word8 => Writable (Image arr RGB Word8) JPG where- encode _ opts = encodeJPG opts (convert :: Pixel RGB Word8 -> JP.PixelRGB8) --instance ManifestArray arr CMYK Word8 => Writable (Image arr CMYK Word8) JPG where- encode _ opts = encodeJPG opts (convert :: Pixel CMYK Word8 -> JP.PixelCMYK8) - -instance ManifestArray arr YCbCr Word8 => Writable (Image arr YCbCr Word8) JPG where- encode _ opts = encodeJPG opts (convert :: Pixel YCbCr Word8 -> JP.PixelYCbCr8) --instance ManifestArray arr Y Double => Writable (Image arr Y Double) JPG where- encode _ opts = encodeJPG opts ((convert :: Pixel Y Word8 -> JP.Pixel8)- . toWord8) --instance ManifestArray arr YA Double => Writable (Image arr YA Double) JPG where- encode _ opts = encodeJPG opts ((convert :: Pixel Y Word8 -> JP.Pixel8)- . toWord8 . dropAlpha) --instance ManifestArray arr RGB Double => Writable (Image arr RGB Double) JPG where- encode _ opts = encodeJPG opts ((convert :: Pixel RGB Word8 -> JP.PixelRGB8)- . toWord8) --instance ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) JPG where- encode _ opts = encodeJPG opts ((convert :: Pixel RGB Word8 -> JP.PixelRGB8)- . toWord8 . dropAlpha) ----- Writable PNG--instance ManifestArray arr Binary Bit => Writable (Image arr Binary Bit) PNG where- encode _ _ = JP.encodePng . imageToJPImage ((convert :: Pixel Y Word8 -> JP.Pixel8) - . fromPixelBinary)- -instance ManifestArray arr Y Word8 => Writable (Image arr Y Word8) PNG where- encode _ _ = JP.encodePng . imageToJPImage (convert :: Pixel Y Word8 -> JP.Pixel8) --instance ManifestArray arr Y Word16 => Writable (Image arr Y Word16) PNG where- encode _ _ = JP.encodePng . imageToJPImage (convert :: Pixel Y Word16 -> JP.Pixel16) --instance ManifestArray arr YA Word8 => Writable (Image arr YA Word8) PNG where- encode _ _ = JP.encodePng . imageToJPImage (convert :: Pixel YA Word8 -> JP.PixelYA8) --instance ManifestArray arr YA Word16 => Writable (Image arr YA Word16) PNG where- encode _ _ = JP.encodePng . imageToJPImage (convert :: Pixel YA Word16 -> JP.PixelYA16) --instance ManifestArray arr RGB Word8 => Writable (Image arr RGB Word8) PNG where- encode _ _ = JP.encodePng . imageToJPImage (convert :: Pixel RGB Word8 -> JP.PixelRGB8) --instance ManifestArray arr RGB Word16 => Writable (Image arr RGB Word16) PNG where- encode _ _ = JP.encodePng . imageToJPImage (convert :: Pixel RGB Word16 -> JP.PixelRGB16) --instance ManifestArray arr RGBA Word8 => Writable (Image arr RGBA Word8) PNG where- encode _ _ = JP.encodePng . imageToJPImage (convert :: Pixel RGBA Word8 -> JP.PixelRGBA8) --instance ManifestArray arr RGBA Word16 => Writable (Image arr RGBA Word16) PNG where- encode _ _ = JP.encodePng . imageToJPImage (convert :: Pixel RGBA Word16 -> JP.PixelRGBA16) ---instance ManifestArray arr Y Double => Writable (Image arr Y Double) PNG where- encode _ _ = JP.encodePng . imageToJPImage ((convert :: Pixel Y Word16 -> JP.Pixel16)- . toWord16)--instance ManifestArray arr YA Double => Writable (Image arr YA Double) PNG where- encode _ _ = JP.encodePng . imageToJPImage ((convert :: Pixel YA Word16 -> JP.PixelYA16)- . toWord16)--instance ManifestArray arr RGB Double => Writable (Image arr RGB Double) PNG where- encode _ _ = JP.encodePng . imageToJPImage ((convert :: Pixel RGB Word16 -> JP.PixelRGB16)- . toWord16)--instance ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) PNG where- encode _ _ = JP.encodePng . imageToJPImage ((convert :: Pixel RGBA Word16 -> JP.PixelRGBA16)- . toWord16)---- Writable TGA--instance ManifestArray arr Binary Bit => Writable (Image arr Binary Bit) TGA where- encode _ _ = JP.encodeTga . imageToJPImage ((convert :: Pixel Y Word8 -> JP.Pixel8)- . fromPixelBinary)- -instance ManifestArray arr Y Word8 => Writable (Image arr Y Word8) TGA where- encode _ _ = JP.encodeTga . imageToJPImage (convert :: Pixel Y Word8 -> JP.Pixel8) --instance ManifestArray arr RGB Word8 => Writable (Image arr RGB Word8) TGA where- encode _ _ = JP.encodeTga . imageToJPImage (convert :: Pixel RGB Word8 -> JP.PixelRGB8) --instance ManifestArray arr RGBA Word8 => Writable (Image arr RGBA Word8) TGA where- encode _ _ = JP.encodeTga . imageToJPImage (convert :: Pixel RGBA Word8 -> JP.PixelRGBA8) ---instance ManifestArray arr Y Double => Writable (Image arr Y Double) TGA where- encode _ _ = JP.encodeTga . imageToJPImage ((convert :: Pixel Y Word8 -> JP.Pixel8)- . toWord8)--instance ManifestArray arr YA Double => Writable (Image arr YA Double) TGA where- encode _ _ = JP.encodeTga . imageToJPImage ((convert :: Pixel Y Word8 -> JP.Pixel8)- . toWord8 . dropAlpha)--instance ManifestArray arr RGB Double => Writable (Image arr RGB Double) TGA where- encode _ _ = JP.encodeTga . imageToJPImage ((convert :: Pixel RGB Word8 -> JP.PixelRGB8)- . toWord8)--instance ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) TGA where- encode _ _ = JP.encodeTga . imageToJPImage ((convert :: Pixel RGBA Word8 -> JP.PixelRGBA8)- . toWord8)---- Writable TIF--instance ManifestArray arr Y Word8 => Writable (Image arr Y Word8) TIF where- encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel Y Word8 -> JP.Pixel8) --instance ManifestArray arr Y Word16 => Writable (Image arr Y Word16) TIF where- encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel Y Word16 -> JP.Pixel16) --instance ManifestArray arr YA Word8 => Writable (Image arr YA Word8) TIF where- encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel YA Word8 -> JP.PixelYA8) --instance ManifestArray arr YA Word16 => Writable (Image arr YA Word16) TIF where- encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel YA Word16 -> JP.PixelYA16) --instance ManifestArray arr RGB Word8 => Writable (Image arr RGB Word8) TIF where- encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel RGB Word8 -> JP.PixelRGB8) --instance ManifestArray arr RGB Word16 => Writable (Image arr RGB Word16) TIF where- encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel RGB Word16 -> JP.PixelRGB16) --instance ManifestArray arr RGBA Word8 => Writable (Image arr RGBA Word8) TIF where- encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel RGBA Word8 -> JP.PixelRGBA8) --instance ManifestArray arr RGBA Word16 => Writable (Image arr RGBA Word16) TIF where- encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel RGBA Word16 -> JP.PixelRGBA16) --instance ManifestArray arr YCbCr Word8 => Writable (Image arr YCbCr Word8) TIF where- encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel YCbCr Word8 -> JP.PixelYCbCr8)- -instance ManifestArray arr CMYK Word8 => Writable (Image arr CMYK Word8) TIF where- encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel CMYK Word8 -> JP.PixelCMYK8) --instance ManifestArray arr CMYK Word16 => Writable (Image arr CMYK Word16) TIF where- encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel CMYK Word16 -> JP.PixelCMYK16) ---instance ManifestArray arr Binary Bit => Writable (Image arr Binary Bit) TIF where- encode _ _ = JP.encodeTiff . imageToJPImage ((convert :: Pixel Y Word8 -> JP.Pixel8)- . fromPixelBinary)- -instance ManifestArray arr Y Double => Writable (Image arr Y Double) TIF where- encode _ _ = JP.encodeTiff . imageToJPImage ((convert :: Pixel Y Word16 -> JP.Pixel16)- . toWord16)--instance ManifestArray arr YA Double => Writable (Image arr YA Double) TIF where- encode _ _ = JP.encodeTiff . imageToJPImage ((convert :: Pixel YA Word16 -> JP.PixelYA16)- . toWord16)--instance ManifestArray arr RGB Double => Writable (Image arr RGB Double) TIF where- encode _ _ = JP.encodeTiff . imageToJPImage ((convert :: Pixel RGB Word16 -> JP.PixelRGB16)- . toWord16)--instance ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) TIF where- encode _ _ = JP.encodeTiff . imageToJPImage ((convert :: Pixel RGBA Word16 -> JP.PixelRGBA16)- . toWord16)--instance ManifestArray arr YCbCr Double => Writable (Image arr YCbCr Double) TIF where- encode _ _ = JP.encodeTiff . imageToJPImage ((convert :: Pixel YCbCr Word8 -> JP.PixelYCbCr8)- . toWord8)--instance ManifestArray arr CMYK Double => Writable (Image arr CMYK Double) TIF where- encode _ _ = JP.encodeTiff . imageToJPImage ((convert :: Pixel CMYK Word16 -> JP.PixelCMYK16)- . toWord16)----imageToJPImage :: (JP.Pixel a, ManifestArray arr cs e) =>- (Pixel cs e -> a) -> Image arr cs e -> JP.Image a-imageToJPImage !f img@(dims -> (m, n)) = JP.generateImage g n m- where g !j !i = f (index img (i, j))- {-# INLINE g #-}-{-# INLINE imageToJPImage #-}---
− src/Graphics/Image/IO/External/Netpbm.hs
@@ -1,297 +0,0 @@-{-# OPTIONS_GHC -fno-warn-orphans #-}-{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, TypeFamilies #-}--- |--- Module : Graphics.Image.IO.External.Netpbm--- Copyright : (c) Alexey Kuleshevich 2016--- License : BSD3--- Maintainer : Alexey Kuleshevich <lehins@yandex.ru>--- Stability : experimental--- Portability : non-portable----module Graphics.Image.IO.External.Netpbm (- PBM(..), PGM(..), PPM(..)- ) where---import Graphics.Image.ColorSpace-import Graphics.Image.Interface hiding (map)-import Graphics.Image.IO.Base-import Foreign.Storable (Storable)-import qualified Data.ByteString as B (ByteString)-import qualified Graphics.Netpbm as PNM-import qualified Data.Vector.Storable as VS ((!), Vector)----- | Netpbm: portable bitmap image with @.pbm@ extension.-data PBM = PBM--instance ImageFormat PBM where- data SaveOption PBM-- ext _ = ".pbm"----- | Netpbm: portable graymap image with @.pgm@ extension.-data PGM = PGM--instance ImageFormat PGM where- data SaveOption PGM-- ext _ = ".pgm"----- | Netpbm: portable pixmap image with @.ppm@ extension.-data PPM = PPM--instance ImageFormat PPM where- data SaveOption PPM-- ext _ = ".ppm"---instance ImageFormat [PBM] where- data SaveOption [PBM]-- ext _ = ".pbm"---instance ImageFormat [PGM] where- data SaveOption [PGM]-- ext _ = ".pgm"---instance ImageFormat [PPM] where- data SaveOption [PPM]-- ext _ = ".ppm"-------------------------------------------------------------------------------------- Converting to and from Netpbm ------------------------------------------------------------------------------------------------------------------------------------ -> Y (Double)--instance Convertible PNM.PbmPixel (Pixel Y Double) where- convert (PNM.PbmPixel bool) = PixelY $ if bool then 0 else 1- -instance Convertible PNM.PgmPixel8 (Pixel Y Double) where- convert (PNM.PgmPixel8 w8) = toDouble . PixelY $ w8--instance Convertible PNM.PgmPixel16 (Pixel Y Double) where- convert (PNM.PgmPixel16 w16) = toDouble . PixelY $ w16--instance Convertible PNM.PpmPixelRGB8 (Pixel Y Double) where- convert (PNM.PpmPixelRGB8 r g b) = toPixelY . toDouble $ PixelRGB r g b--instance Convertible PNM.PpmPixelRGB16 (Pixel Y Double) where- convert (PNM.PpmPixelRGB16 r g b) = toPixelY . toDouble $ PixelRGB r g b---- -> YA (Double)--instance Convertible PNM.PbmPixel (Pixel YA Double) where- convert = addAlpha 1 . (convert :: PNM.PbmPixel -> Pixel Y Double)- -instance Convertible PNM.PgmPixel8 (Pixel YA Double) where- convert = addAlpha 1 . (convert :: PNM.PgmPixel8 -> Pixel Y Double)--instance Convertible PNM.PgmPixel16 (Pixel YA Double) where- convert = addAlpha 1 . (convert :: PNM.PgmPixel16 -> Pixel Y Double)--instance Convertible PNM.PpmPixelRGB8 (Pixel YA Double) where- convert = addAlpha 1 . (convert :: PNM.PpmPixelRGB8 -> Pixel Y Double)--instance Convertible PNM.PpmPixelRGB16 (Pixel YA Double) where- convert = addAlpha 1 . (convert :: PNM.PpmPixelRGB16 -> Pixel Y Double)---- -> RGB (Double)--instance Convertible PNM.PbmPixel (Pixel RGB Double) where- convert = toPixelRGB . (convert :: PNM.PbmPixel -> Pixel Y Double)- -instance Convertible PNM.PgmPixel8 (Pixel RGB Double) where- convert = toPixelRGB . (convert :: PNM.PgmPixel8 -> Pixel Y Double)--instance Convertible PNM.PgmPixel16 (Pixel RGB Double) where- convert = toPixelRGB . (convert :: PNM.PgmPixel16 -> Pixel Y Double)--instance Convertible PNM.PpmPixelRGB8 (Pixel RGB Double) where- convert (PNM.PpmPixelRGB8 r g b) = toDouble $ PixelRGB r g b--instance Convertible PNM.PpmPixelRGB16 (Pixel RGB Double) where- convert (PNM.PpmPixelRGB16 r g b) = toDouble $ PixelRGB r g b----- -> RGBA (Double)--instance Convertible PNM.PbmPixel (Pixel RGBA Double) where- convert = addAlpha 1 . (convert :: PNM.PbmPixel -> Pixel RGB Double)- -instance Convertible PNM.PgmPixel8 (Pixel RGBA Double) where- convert = addAlpha 1 . (convert :: PNM.PgmPixel8 -> Pixel RGB Double)--instance Convertible PNM.PgmPixel16 (Pixel RGBA Double) where- convert = addAlpha 1 . (convert :: PNM.PgmPixel16 -> Pixel RGB Double)--instance Convertible PNM.PpmPixelRGB8 (Pixel RGBA Double) where- convert = addAlpha 1 . (convert :: PNM.PpmPixelRGB8 -> Pixel RGB Double)--instance Convertible PNM.PpmPixelRGB16 (Pixel RGBA Double) where- convert = addAlpha 1 . (convert :: PNM.PpmPixelRGB16 -> Pixel RGB Double)------- Exact precision conversions---instance Convertible PNM.PbmPixel (Pixel Binary Bit) where- convert (PNM.PbmPixel bool) = fromBool bool- -instance Convertible PNM.PgmPixel8 (Pixel Y Word8) where- convert (PNM.PgmPixel8 w8) = PixelY w8--instance Convertible PNM.PgmPixel16 (Pixel Y Word16) where- convert (PNM.PgmPixel16 w16) = PixelY w16--instance Convertible PNM.PpmPixelRGB8 (Pixel RGB Word8) where- convert (PNM.PpmPixelRGB8 r g b) = PixelRGB r g b--instance Convertible PNM.PpmPixelRGB16 (Pixel RGB Word16) where- convert (PNM.PpmPixelRGB16 r g b) = PixelRGB r g b-------------------------------------------------------------------------------------- Decoding images using Netpbm -------------------------------------------------------------------------------------------------------------------------------------- BMP Format Reading (general)--instance Array arr Y Double => Readable (Image arr Y Double) PBM where- decode _ = either Left (Right . ppmToImageUsing (pnmDataToImage id) . head) . decodePnm--instance Array arr Y Double => Readable (Image arr Y Double) PGM where- decode _ = either Left (Right . ppmToImageUsing (pnmDataToImage id) . head) . decodePnm--instance Array arr Y Double => Readable (Image arr Y Double) PPM where- decode _ = either Left (Right . ppmToImageUsing (pnmDataToImage id) . head) . decodePnm--instance Array arr YA Double => Readable (Image arr YA Double) PPM where- decode _ = either Left (Right . ppmToImageUsing (pnmDataToImage (addAlpha 1)) . head) . decodePnm--instance Array arr RGB Double => Readable (Image arr RGB Double) PPM where- decode _ = either Left (Right . ppmToImageUsing (pnmDataToImage id) . head) . decodePnm--instance Array arr RGBA Double => Readable (Image arr RGBA Double) PPM where- decode _ = either Left (Right . ppmToImageUsing (pnmDataToImage (addAlpha 1)) . head) . decodePnm---- BMP Format Reading (exact)--instance Array arr Binary Bit => Readable (Image arr Binary Bit) PBM where- decode _ = either Left (ppmToImageUsing pnmDataPBMToImage . head) . decodePnm--instance Array arr Y Word8 => Readable (Image arr Y Word8) PGM where- decode _ = either Left (ppmToImageUsing pnmDataPGM8ToImage . head) . decodePnm--instance Array arr Y Word16 => Readable (Image arr Y Word16) PGM where- decode _ = either Left (ppmToImageUsing pnmDataPGM16ToImage . head) . decodePnm--instance Array arr RGB Word8 => Readable (Image arr RGB Word8) PPM where- decode _ = either Left (ppmToImageUsing pnmDataPPM8ToImage . head) . decodePnm--instance Array arr RGB Word16 => Readable (Image arr RGB Word16) PPM where- decode _ = either Left (ppmToImageUsing pnmDataPPM16ToImage . head) . decodePnm---instance Array arr Binary Bit => Readable [Image arr Binary Bit] [PBM] where- decode _ = pnmToImagesUsing pnmDataPBMToImage--instance Array arr Y Word8 => Readable [Image arr Y Word8] [PGM] where- decode _ = pnmToImagesUsing pnmDataPGM8ToImage--instance Array arr Y Word16 => Readable [Image arr Y Word16] [PGM] where- decode _ = pnmToImagesUsing pnmDataPGM16ToImage--instance Array arr RGB Word8 => Readable [Image arr RGB Word8] [PPM] where- decode _ = pnmToImagesUsing pnmDataPPM8ToImage--instance Array arr RGB Word16 => Readable [Image arr RGB Word16] [PPM] where- decode _ = pnmToImagesUsing pnmDataPPM16ToImage---pnmToImagesUsing :: (Int -> Int -> PNM.PpmPixelData -> Either [Char] b)- -> B.ByteString -> Either String [b]-pnmToImagesUsing conv =- either Left (Right . map (either error id . ppmToImageUsing conv)) . decodePnm---getPx :: (Storable a, Convertible a b) => VS.Vector a -> Int -> (Int, Int) -> b-getPx v w (i, j) = convert (v VS.! (i * w + j))---pnmDataToImage :: (Array arr cs e, Convertible PNM.PbmPixel px,- Convertible PNM.PgmPixel16 px, Convertible PNM.PgmPixel8 px,- Convertible PNM.PpmPixelRGB16 px, Convertible PNM.PpmPixelRGB8 px) =>- (px -> Pixel cs e) -> Int -> Int -> PNM.PpmPixelData -> Image arr cs e-pnmDataToImage conv w h (PNM.PbmPixelData v) = makeImage (h, w) (conv . getPx v w)-pnmDataToImage conv w h (PNM.PgmPixelData8 v) = makeImage (h, w) (conv . getPx v w)-pnmDataToImage conv w h (PNM.PgmPixelData16 v) = makeImage (h, w) (conv . getPx v w)-pnmDataToImage conv w h (PNM.PpmPixelDataRGB8 v) = makeImage (h, w) (conv . getPx v w)-pnmDataToImage conv w h (PNM.PpmPixelDataRGB16 v) = makeImage (h, w) (conv . getPx v w)---pnmDataPBMToImage :: (Array arr cs e, Convertible PNM.PbmPixel (Pixel cs e)) =>- Int -> Int -> PNM.PpmPixelData -> Either String (Image arr cs e)-pnmDataPBMToImage w h (PNM.PbmPixelData v) = Right $ makeImage (h, w) (getPx v w)-pnmDataPBMToImage _ _ d = pnmCSError "Binary (Pixel Binary Bit)" d--pnmDataPGM8ToImage :: (Array arr cs e, Convertible PNM.PgmPixel8 (Pixel cs e)) =>- Int -> Int -> PNM.PpmPixelData -> Either String (Image arr cs e)-pnmDataPGM8ToImage w h (PNM.PgmPixelData8 v) = Right $ makeImage (h, w) (getPx v w)-pnmDataPGM8ToImage _ _ d = pnmCSError "Y8 (Pixel Y Word8)" d--pnmDataPGM16ToImage :: (Array arr cs e, Convertible PNM.PgmPixel16 (Pixel cs e)) =>- Int -> Int -> PNM.PpmPixelData -> Either String (Image arr cs e)-pnmDataPGM16ToImage w h (PNM.PgmPixelData16 v) = Right $ makeImage (h, w) (getPx v w)-pnmDataPGM16ToImage _ _ d = pnmCSError "Y16 (Pixel Y Word16)" d--pnmDataPPM8ToImage :: (Array arr cs e, Convertible PNM.PpmPixelRGB8 (Pixel cs e)) =>- Int -> Int -> PNM.PpmPixelData -> Either String (Image arr cs e)-pnmDataPPM8ToImage w h (PNM.PpmPixelDataRGB8 v) = Right $ makeImage (h, w) (getPx v w)-pnmDataPPM8ToImage _ _ d = pnmCSError "RGB8 (Pixel RGB Word8)" d--pnmDataPPM16ToImage :: (Array arr cs e, Convertible PNM.PpmPixelRGB16 (Pixel cs e)) =>- Int -> Int -> PNM.PpmPixelData -> Either String (Image arr cs e)-pnmDataPPM16ToImage w h (PNM.PpmPixelDataRGB16 v) = Right $ makeImage (h, w) (getPx v w)-pnmDataPPM16ToImage _ _ d = pnmCSError "RGB16 (Pixel RGB Word16)" d---ppmToImageUsing :: (Int -> Int -> PNM.PpmPixelData -> t) -> PNM.PPM -> t-ppmToImageUsing conv (PNM.PPM { PNM.ppmHeader = PNM.PPMHeader { PNM.ppmWidth = w- , PNM.ppmHeight = h }- , PNM.ppmData = ppmData }) = conv w h ppmData- --decodePnm :: B.ByteString -> Either String [PNM.PPM]-decodePnm = pnmResultToImage . PNM.parsePPM where- pnmResultToImage (Right ([], _)) = pnmError "Unknown"- pnmResultToImage (Right (ppms, _)) = Right ppms- pnmResultToImage (Left err) = pnmError err-----pnmError :: String -> Either String a-pnmError err = Left ("Netpbm decoding error: "++err)---pnmCSError :: String -> PNM.PpmPixelData -> Either String a-pnmCSError cs ppmData = pnmError ("Input image is in "++(pnmShowData ppmData)++- ", cannot convert it to "++cs++" colorspace.")--pnmShowData :: PNM.PpmPixelData -> String-pnmShowData (PNM.PbmPixelData _) = "Binary (Pixel Binary Bit)"-pnmShowData (PNM.PgmPixelData8 _) = "Y8 (Pixel Y Word8)"-pnmShowData (PNM.PgmPixelData16 _) = "Y16 (Pixel Y Word16)"-pnmShowData (PNM.PpmPixelDataRGB8 _) = "RGB8 (Pixel RGB Word8)"-pnmShowData (PNM.PpmPixelDataRGB16 _) = "RGB8 (Pixel RGB Word8)"
+ src/Graphics/Image/IO/Formats.hs view
@@ -0,0 +1,117 @@+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE UndecidableInstances #-}+-- |+-- Module : Graphics.Image.IO.Formats+-- Copyright : (c) Alexey Kuleshevich 2016+-- License : BSD3+-- Maintainer : Alexey Kuleshevich <lehins@yandex.ru>+-- Stability : experimental+-- Portability : non-portable+--+module Graphics.Image.IO.Formats (+ module Graphics.Image.IO.Formats.JuicyPixels,+ module Graphics.Image.IO.Formats.Netpbm,+ InputFormat, OutputFormat,+ Readable(..), Writable(..), ImageFormat(..),+ ) where++import Graphics.Image.Interface+import Graphics.Image.IO.Base+import Graphics.Image.IO.Formats.JuicyPixels+import Graphics.Image.IO.Formats.Netpbm+++-- | A collection of all image formats that can be read into HIP images with+-- 'Double' precision pixel channels.+data InputFormat = InputBMP+ | InputGIF+ | InputHDR+ | InputJPG+ | InputPNG+ | InputTIF+ | InputPNM+ | InputTGA deriving (Show, Enum, Eq)+++instance ImageFormat InputFormat where+ data SaveOption InputFormat++ ext InputBMP = ext BMP+ ext InputGIF = ext GIF+ ext InputHDR = ext HDR+ ext InputJPG = ext JPG+ ext InputPNG = ext PNG+ ext InputTGA = ext TGA+ ext InputTIF = ext TIF+ ext InputPNM = ext PPM++ exts InputBMP = exts BMP+ exts InputGIF = exts GIF+ exts InputHDR = exts HDR+ exts InputJPG = exts JPG+ exts InputPNG = exts PNG+ exts InputTGA = exts TGA+ exts InputTIF = exts TIF+ exts InputPNM = [ext PBM, ext PGM, ext PPM]+++instance (Readable (Image arr cs Double) BMP,+ Readable (Image arr cs Double) GIF,+ Readable (Image arr cs Double) HDR,+ Readable (Image arr cs Double) JPG,+ Readable (Image arr cs Double) PNG,+ Readable (Image arr cs Double) TGA,+ Readable (Image arr cs Double) TIF,+ Readable (Image arr cs Double) PPM) =>+ Readable (Image arr cs Double) InputFormat where+ decode InputBMP = decode BMP+ decode InputGIF = decode GIF+ decode InputHDR = decode HDR+ decode InputJPG = decode JPG+ decode InputPNG = decode PNG+ decode InputTIF = decode TIF+ decode InputPNM = decode PPM+ decode InputTGA = decode TGA++++-- | A collection of all image formats that can be written to file using images with+-- 'Double' precision pixels.+data OutputFormat = OutputBMP+ | OutputGIF+ | OutputHDR+ | OutputJPG+ | OutputPNG+ | OutputTIF+ | OutputTGA deriving (Show, Enum, Eq)+++instance ImageFormat OutputFormat where+ data SaveOption OutputFormat+ ext OutputBMP = ext BMP+ ext OutputGIF = ext GIF+ ext OutputHDR = ext HDR+ ext OutputJPG = ext JPG+ ext OutputPNG = ext PNG+ ext OutputTGA = ext TGA+ ext OutputTIF = ext TIF+++instance (Writable (Image arr cs Double) BMP,+ Writable (Image arr cs Double) GIF,+ Writable (Image arr cs Double) HDR,+ Writable (Image arr cs Double) JPG,+ Writable (Image arr cs Double) PNG,+ Writable (Image arr cs Double) TGA,+ Writable (Image arr cs Double) TIF) =>+ Writable (Image arr cs Double) OutputFormat where+ encode OutputBMP _ = encode BMP []+ encode OutputGIF _ = encode GIF []+ encode OutputHDR _ = encode HDR []+ encode OutputJPG _ = encode JPG []+ encode OutputPNG _ = encode PNG []+ encode OutputTGA _ = encode TGA []+ encode OutputTIF _ = encode TIF []
+ src/Graphics/Image/IO/Formats/JuicyPixels.hs view
@@ -0,0 +1,1096 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE ViewPatterns #-}+-- |+-- Module : Graphics.Image.IO.Formats.JuicyPixels+-- Copyright : (c) Alexey Kuleshevich 2016+-- License : BSD3+-- Maintainer : Alexey Kuleshevich <lehins@yandex.ru>+-- Stability : experimental+-- Portability : non-portable+--+module Graphics.Image.IO.Formats.JuicyPixels (+ BMP(..),+ GIF(..), JP.GifDelay, JP.GifLooping(..), JP.PaletteOptions(..), JP.PaletteCreationMethod(..),+ HDR(..),+ JPG(..),+ PNG(..),+ TGA(..),+ TIF(..),+ SaveOption(..),+ ) where++import GHC.Float+import Data.Either+import qualified Data.Monoid as M (mempty)+import Graphics.Image.ColorSpace+import Graphics.Image.Interface hiding (map)+import Graphics.Image.IO.Base+import qualified Data.ByteString as B (ByteString)+import qualified Data.ByteString.Lazy as BL (ByteString)+import qualified Codec.Picture as JP+import qualified Codec.Picture.Jpg as JP+import qualified Codec.Picture.Types as JP+import qualified Codec.Picture.ColorQuant as JP+++-- | Bitmap image with @.bmp@ extension.+data BMP = BMP++instance ImageFormat BMP where+ data SaveOption BMP++ ext _ = ".bmp"+++-- | Graphics Interchange Format image with @.gif@ extension.+data GIF = GIF++instance ImageFormat GIF where+ data SaveOption GIF = GIFPalette JP.PaletteOptions+ + ext _ = ".gif"++instance ImageFormat [GIF] where+ data SaveOption [GIF] = GIFsPalette JP.PaletteOptions+ | GIFsLooping JP.GifLooping++ ext _ = ext GIF++-- | High-dynamic-range image with @.hdr@ or @.pic@ extension.+data HDR = HDR++instance ImageFormat HDR where+ data SaveOption HDR++ ext _ = ".hdr"++ exts _ = [".hdr", ".pic"]+++-- | Joint Photographic Experts Group image with @.jpg@ or @.jpeg@ extension.+data JPG = JPG++instance ImageFormat JPG where+ data SaveOption JPG = JPGQuality Word8++ ext _ = ".jpg"++ exts _ = [".jpg", ".jpeg"]+++-- | Portable Network Graphics image with @.png@ extension.+data PNG = PNG++instance ImageFormat PNG where+ data SaveOption PNG++ ext _ = ".png"+++-- | Truevision Graphics Adapter image with .tga extension.+data TGA = TGA++instance ImageFormat TGA where+ data SaveOption TGA++ ext _ = ".tga"+++-- | Tagged Image File Format image with @.tif@ or @.tiff@ extension.+data TIF = TIF++instance ImageFormat TIF where+ data SaveOption TIF ++ ext _ = ".tif"++ exts _ = [".tif", ".tiff"]+++--------------------------------------------------------------------------------+-- Converting to and from JuicyPixels ------------------------------------------+--------------------------------------------------------------------------------++-- Y -> Y (Double)++instance Convertible JP.Pixel8 (Pixel Y Double) where+ convert = toDouble . PixelY++instance Convertible JP.Pixel16 (Pixel Y Double) where+ convert = toDouble . PixelY++instance Convertible JP.PixelF (Pixel Y Double) where+ convert = toDouble . PixelY++instance Convertible JP.PixelYA8 (Pixel Y Double) where+ convert = convert . JP.dropTransparency++instance Convertible JP.PixelYA16 (Pixel Y Double) where+ convert = convert . JP.dropTransparency++instance Convertible JP.Pixel8 (Pixel YA Double) where+ convert = addAlpha 1 . convert++instance Convertible JP.Pixel16 (Pixel YA Double) where+ convert = addAlpha 1 . convert+ +instance Convertible JP.PixelF (Pixel YA Double) where+ convert = addAlpha 1 . convert++instance Convertible JP.PixelYA8 (Pixel YA Double) where+ convert (JP.PixelYA8 y a) = toDouble (PixelYA y a)++instance Convertible JP.PixelYA16 (Pixel YA Double) where+ convert (JP.PixelYA16 y a) = toDouble (PixelYA y a)+++-- Color -> Y (Double)++instance Convertible JP.PixelRGB8 (Pixel Y Double) where+ convert = toPixelY . (convert :: JP.PixelRGB8 -> Pixel RGB Double)++instance Convertible JP.PixelRGB16 (Pixel Y Double) where+ convert = toPixelY . (convert :: JP.PixelRGB16 -> Pixel RGB Double)++instance Convertible JP.PixelRGBA8 (Pixel Y Double) where+ convert = toPixelY . (convert :: JP.PixelRGBA8 -> Pixel RGB Double)++instance Convertible JP.PixelRGBA16 (Pixel Y Double) where+ convert = toPixelY . (convert :: JP.PixelRGBA16 -> Pixel RGB Double)++instance Convertible JP.PixelRGBF (Pixel Y Double) where+ convert = toPixelY . (convert :: JP.PixelRGBF -> Pixel RGB Double)++instance Convertible JP.PixelCMYK8 (Pixel Y Double) where+ convert = toPixelY . toDouble . (convert :: JP.PixelCMYK8 -> Pixel CMYK Word8)++instance Convertible JP.PixelCMYK16 (Pixel Y Double) where+ convert = toPixelY . toDouble . (convert :: JP.PixelCMYK16 -> Pixel CMYK Word16)++instance Convertible JP.PixelYCbCr8 (Pixel Y Double) where+ convert = convert . JP.computeLuma++-- Color -> YA (Double) ++instance Convertible JP.PixelRGB8 (Pixel YA Double) where+ convert = addAlpha 1 . convert++instance Convertible JP.PixelRGB16 (Pixel YA Double) where+ convert = addAlpha 1 . convert+ +instance Convertible JP.PixelRGBF (Pixel YA Double) where+ convert = addAlpha 1 . convert+ +instance Convertible JP.PixelCMYK8 (Pixel YA Double) where+ convert = addAlpha 1 . convert++instance Convertible JP.PixelCMYK16 (Pixel YA Double) where+ convert = addAlpha 1 . convert+ +instance Convertible JP.PixelYCbCr8 (Pixel YA Double) where+ convert = addAlpha 1 . convert++instance Convertible JP.PixelRGBA8 (Pixel YA Double) where+ convert = toPixelYA . (convert :: JP.PixelRGBA8 -> Pixel RGBA Double)++instance Convertible JP.PixelRGBA16 (Pixel YA Double) where+ convert = toPixelYA . (convert :: JP.PixelRGBA16 -> Pixel RGBA Double)+ + ++-- Y -> RGB (Double)++instance Convertible JP.Pixel8 (Pixel RGB Double) where+ convert = toDouble . fromChannel++instance Convertible JP.Pixel16 (Pixel RGB Double) where+ convert = toDouble . fromChannel++instance Convertible JP.PixelF (Pixel RGB Double) where+ convert = toDouble . fromChannel++instance Convertible JP.PixelYA8 (Pixel RGB Double) where+ convert = convert . JP.dropTransparency++instance Convertible JP.PixelYA16 (Pixel RGB Double) where+ convert = convert . JP.dropTransparency++-- Color -> RGB (Double)++instance Convertible JP.PixelRGB8 (Pixel RGB Double) where+ convert (JP.PixelRGB8 r g b) = toDouble $ PixelRGB r g b++instance Convertible JP.PixelRGB16 (Pixel RGB Double) where+ convert (JP.PixelRGB16 r g b) = toDouble $ PixelRGB r g b++instance Convertible JP.PixelRGBA8 (Pixel RGB Double) where+ convert = convert . JP.dropTransparency++instance Convertible JP.PixelRGBA16 (Pixel RGB Double) where+ convert = convert . JP.dropTransparency++instance Convertible JP.PixelRGBF (Pixel RGB Double) where+ convert (JP.PixelRGBF r g b) = + PixelRGB (float2Double r) (float2Double g) (float2Double b)++instance Convertible JP.PixelYCbCr8 (Pixel RGB Double) where+ convert = convert . (JP.convertPixel :: JP.PixelYCbCr8 -> JP.PixelRGB8)++instance Convertible JP.PixelCMYK8 (Pixel RGB Double) where+ convert = convert . (JP.convertPixel :: JP.PixelCMYK8 -> JP.PixelRGB8)++instance Convertible JP.PixelCMYK16 (Pixel RGB Double) where+ convert = convert . (JP.convertPixel :: JP.PixelCMYK16 -> JP.PixelRGB16)++-- Y -> RGBA (Double)++instance Convertible JP.Pixel8 (Pixel RGBA Double) where+ convert = addAlpha 1 . convert++instance Convertible JP.Pixel16 (Pixel RGBA Double) where+ convert = addAlpha 1 . convert++instance Convertible JP.PixelF (Pixel RGBA Double) where+ convert = addAlpha 1 . convert++instance Convertible JP.PixelYA8 (Pixel RGBA Double) where+ convert = toPixelRGBA . (convert :: JP.PixelYA8 -> Pixel YA Double)++instance Convertible JP.PixelYA16 (Pixel RGBA Double) where+ convert = toPixelRGBA . (convert :: JP.PixelYA16 -> Pixel YA Double)++-- Color -> RGBA (Double)++instance Convertible JP.PixelRGB8 (Pixel RGBA Double) where+ convert = addAlpha 1 . convert+ +instance Convertible JP.PixelRGB16 (Pixel RGBA Double) where+ convert = addAlpha 1 . convert++instance Convertible JP.PixelRGBF (Pixel RGBA Double) where+ convert = addAlpha 1 . convert++instance Convertible JP.PixelCMYK8 (Pixel RGBA Double) where+ convert = addAlpha 1 . convert+ +instance Convertible JP.PixelCMYK16 (Pixel RGBA Double) where+ convert = addAlpha 1 . convert++instance Convertible JP.PixelYCbCr8 (Pixel RGBA Double) where+ convert = addAlpha 1 . convert+ +instance Convertible JP.PixelRGBA8 (Pixel RGBA Double) where+ convert (JP.PixelRGBA8 r g b a) = toDouble $ PixelRGBA r g b a+ +instance Convertible JP.PixelRGBA16 (Pixel RGBA Double) where+ convert (JP.PixelRGBA16 r g b a) = toDouble $ PixelRGBA r g b a+++---- to JuicyPixels -----++---- Exact precision conversions++instance Convertible JP.Pixel8 (Pixel Y Word8) where+ convert = PixelY+ +instance Convertible JP.Pixel16 (Pixel Y Word16) where+ convert = PixelY++instance Convertible JP.Pixel32 (Pixel Y Word32) where+ convert = PixelY++instance Convertible JP.PixelF (Pixel Y Float) where+ convert = PixelY++instance Convertible JP.PixelYA8 (Pixel YA Word8) where+ convert (JP.PixelYA8 g a) = PixelYA g a+ +instance Convertible JP.PixelYA16 (Pixel YA Word16) where+ convert (JP.PixelYA16 g a) = PixelYA g a++instance Convertible JP.PixelRGB8 (Pixel RGB Word8) where+ convert (JP.PixelRGB8 r g b) = PixelRGB r g b+ +instance Convertible JP.PixelRGB16 (Pixel RGB Word16) where+ convert (JP.PixelRGB16 r g b) = PixelRGB r g b++instance Convertible JP.PixelRGBF (Pixel RGB Float) where+ convert (JP.PixelRGBF r g b) = PixelRGB r g b++instance Convertible JP.PixelRGBA8 (Pixel RGBA Word8) where+ convert (JP.PixelRGBA8 r g b a) = PixelRGBA r g b a+ +instance Convertible JP.PixelRGBA16 (Pixel RGBA Word16) where+ convert (JP.PixelRGBA16 r g b a) = PixelRGBA r g b a++instance Convertible JP.PixelYCbCr8 (Pixel YCbCr Word8) where+ convert (JP.PixelYCbCr8 y cb cr) = PixelYCbCr y cb cr++instance Convertible JP.PixelCMYK8 (Pixel CMYK Word8) where+ convert (JP.PixelCMYK8 c m y k) = PixelCMYK c m y k++instance Convertible JP.PixelCMYK16 (Pixel CMYK Word16) where+ convert (JP.PixelCMYK16 c m y k) = PixelCMYK c m y k++++instance Convertible (Pixel Y Word8) JP.Pixel8 where+ convert (PixelY g) = g+ +instance Convertible (Pixel Y Word16) JP.Pixel16 where+ convert (PixelY g) = g++instance Convertible (Pixel Y Word32) JP.Pixel32 where+ convert (PixelY g) = g++instance Convertible (Pixel Y Float) JP.PixelF where+ convert (PixelY g) = g++instance Convertible (Pixel YA Word8) JP.PixelYA8 where+ convert (PixelYA g a) = JP.PixelYA8 g a+ +instance Convertible (Pixel YA Word16) JP.PixelYA16 where+ convert (PixelYA g a) = JP.PixelYA16 g a++instance Convertible (Pixel RGB Word8) JP.PixelRGB8 where+ convert (PixelRGB r g b) = JP.PixelRGB8 r g b+ +instance Convertible (Pixel RGB Word16) JP.PixelRGB16 where+ convert (PixelRGB r g b) = JP.PixelRGB16 r g b++instance Convertible (Pixel RGB Float) JP.PixelRGBF where+ convert (PixelRGB r g b) = JP.PixelRGBF r g b++instance Convertible (Pixel RGBA Word8) JP.PixelRGBA8 where+ convert (PixelRGBA r g b a) = JP.PixelRGBA8 r g b a+ +instance Convertible (Pixel RGBA Word16) JP.PixelRGBA16 where+ convert (PixelRGBA r g b a) = JP.PixelRGBA16 r g b a+++instance Convertible (Pixel YCbCr Word8) JP.PixelYCbCr8 where+ convert (PixelYCbCr y cb cr) = JP.PixelYCbCr8 y cb cr++instance Convertible (Pixel CMYK Word8) JP.PixelCMYK8 where+ convert (PixelCMYK c m y k) = JP.PixelCMYK8 c m y k++instance Convertible (Pixel CMYK Word16) JP.PixelCMYK16 where+ convert (PixelCMYK c m y k) = JP.PixelCMYK16 c m y k++++--------------------------------------------------------------------------------+-- Decoding images using JuicyPixels ------------------------------------------+--------------------------------------------------------------------------------+++-- BMP Format Reading++instance (Array arr Y Word8, Array arr Binary Bit) => Readable (Image arr Binary Bit) BMP where+ decode _ = either Left (Right . toImageBinary) . jpImageY8ToImage . JP.decodeBitmap++instance Array arr Y Word8 => Readable (Image arr Y Word8) BMP where+ decode _ = jpImageY8ToImage . JP.decodeBitmap++instance Array arr RGB Word8 => Readable (Image arr RGB Word8) BMP where+ decode _ = jpImageRGB8ToImage . JP.decodeBitmap++instance Array arr RGBA Word8 => Readable (Image arr RGBA Word8) BMP where+ decode _ = jpImageRGBA8ToImage . JP.decodeBitmap++instance Array arr Y Double => Readable (Image arr Y Double) BMP where+ decode _ = jpDynamicImageToImage . JP.decodeBitmap++instance Array arr YA Double => Readable (Image arr YA Double) BMP where+ decode _ = jpDynamicImageToImage . JP.decodeBitmap++instance Array arr RGB Double => Readable (Image arr RGB Double) BMP where+ decode _ = jpDynamicImageToImage . JP.decodeBitmap++instance Array arr RGBA Double => Readable (Image arr RGBA Double) BMP where+ decode _ = jpDynamicImageToImage . JP.decodeBitmap+++-- GIF Format Reading++instance Array arr RGB Word8 => Readable (Image arr RGB Word8) GIF where+ decode _ = jpImageRGB8ToImage . JP.decodeGif++instance Array arr RGBA Word8 => Readable (Image arr RGBA Word8) GIF where+ decode _ = jpImageRGBA8ToImage . JP.decodeGif++instance Array arr Y Double => Readable (Image arr Y Double) GIF where+ decode _ = jpDynamicImageToImage . JP.decodeGif++instance Array arr YA Double => Readable (Image arr YA Double) GIF where+ decode _ = jpDynamicImageToImage . JP.decodeGif++instance Array arr RGB Double => Readable (Image arr RGB Double) GIF where+ decode _ = jpDynamicImageToImage . JP.decodeGif++instance Array arr RGBA Double => Readable (Image arr RGBA Double) GIF where+ decode _ = jpDynamicImageToImage . JP.decodeGif++-- List of GIF Format frames Reading++decodeGifs :: (Either String JP.DynamicImage -> Either String img)+ -> B.ByteString -> Either String [img]+decodeGifs decoder = either Left decodeLS . JP.decodeGifImages where+ decodeLS ls = if null errs then Right imgs else Left $ unlines errs where+ (errs, imgs) = partitionEithers $ map (decoder . Right) ls++instance Array arr RGB Word8 => Readable [Image arr RGB Word8] [GIF] where+ decode _ = decodeGifs jpImageRGB8ToImage++instance Array arr RGBA Word8 => Readable [Image arr RGBA Word8] [GIF] where+ decode _ = decodeGifs jpImageRGBA8ToImage++instance Array arr Y Double => Readable [Image arr Y Double] [GIF] where+ decode _ = decodeGifs jpDynamicImageToImage++instance Array arr YA Double => Readable [Image arr YA Double] [GIF] where+ decode _ = decodeGifs jpDynamicImageToImage++instance Array arr RGB Double => Readable [Image arr RGB Double] [GIF] where+ decode _ = decodeGifs jpDynamicImageToImage++instance Array arr RGBA Double => Readable [Image arr RGBA Double] [GIF] where+ decode _ = decodeGifs jpDynamicImageToImage+ +++-- HDR Format Reading++instance Array arr RGB Float => Readable (Image arr RGB Float) HDR where+ decode _ = jpImageRGBFToImage . JP.decodeHDR++instance Array arr Y Double => Readable (Image arr Y Double) HDR where+ decode _ = jpDynamicImageToImage . JP.decodeHDR++instance Array arr YA Double => Readable (Image arr YA Double) HDR where+ decode _ = jpDynamicImageToImage . JP.decodeHDR++instance Array arr RGB Double => Readable (Image arr RGB Double) HDR where+ decode _ = jpDynamicImageToImage . JP.decodeHDR++instance Array arr RGBA Double => Readable (Image arr RGBA Double) HDR where+ decode _ = jpDynamicImageToImage . JP.decodeHDR+++-- JPG Format Reading++instance Array arr Y Word8 => Readable (Image arr Y Word8) JPG where+ decode _ = jpImageY8ToImage . JP.decodeJpeg++instance Array arr YA Word8 => Readable (Image arr YA Word8) JPG where+ decode _ = jpImageYA8ToImage . JP.decodeJpeg++instance Array arr RGB Word8 => Readable (Image arr RGB Word8) JPG where+ decode _ = jpImageRGB8ToImage . JP.decodeJpeg++instance Array arr CMYK Word8 => Readable (Image arr CMYK Word8) JPG where+ decode _ = jpImageCMYK8ToImage . JP.decodeJpeg++instance Array arr YCbCr Word8 => Readable (Image arr YCbCr Word8) JPG where+ decode _ = jpImageYCbCr8ToImage . JP.decodeJpeg++instance Array arr Y Double => Readable (Image arr Y Double) JPG where+ decode _ = jpDynamicImageToImage . JP.decodeJpeg++instance Array arr YA Double => Readable (Image arr YA Double) JPG where+ decode _ = jpDynamicImageToImage . JP.decodeJpeg++instance Array arr RGB Double => Readable (Image arr RGB Double) JPG where+ decode _ = jpDynamicImageToImage . JP.decodeJpeg++instance Array arr RGBA Double => Readable (Image arr RGBA Double) JPG where+ decode _ = jpDynamicImageToImage . JP.decodeJpeg+++-- PNG Format Reading++instance (Array arr Y Word8, Array arr Binary Bit) => Readable (Image arr Binary Bit) PNG where+ decode _ = fmap toImageBinary . jpImageY8ToImage . JP.decodePng++instance Array arr Y Word8 => Readable (Image arr Y Word8) PNG where+ decode _ = jpImageY8ToImage . JP.decodePng++instance Array arr Y Word16 => Readable (Image arr Y Word16) PNG where+ decode _ = jpImageY16ToImage . JP.decodePng++instance Array arr YA Word8 => Readable (Image arr YA Word8) PNG where+ decode _ = jpImageYA8ToImage . JP.decodePng++instance Array arr YA Word16 => Readable (Image arr YA Word16) PNG where+ decode _ = jpImageYA16ToImage . JP.decodePng++instance Array arr RGB Word8 => Readable (Image arr RGB Word8) PNG where+ decode _ = jpImageRGB8ToImage . JP.decodePng++instance Array arr RGB Word16 => Readable (Image arr RGB Word16) PNG where+ decode _ = jpImageRGB16ToImage . JP.decodePng++instance Array arr RGBA Word8 => Readable (Image arr RGBA Word8) PNG where+ decode _ = jpImageRGBA8ToImage . JP.decodePng++instance Array arr RGBA Word16 => Readable (Image arr RGBA Word16) PNG where+ decode _ = jpImageRGBA16ToImage . JP.decodePng++instance Array arr Y Double => Readable (Image arr Y Double) PNG where+ decode _ = jpDynamicImageToImage . JP.decodePng++instance Array arr YA Double => Readable (Image arr YA Double) PNG where+ decode _ = jpDynamicImageToImage . JP.decodePng++instance Array arr RGB Double => Readable (Image arr RGB Double) PNG where+ decode _ = jpDynamicImageToImage . JP.decodePng++instance Array arr RGBA Double => Readable (Image arr RGBA Double) PNG where+ decode _ = jpDynamicImageToImage . JP.decodePng+++-- TGA Format Reading++instance (Array arr Y Word8, Array arr Binary Bit) => Readable (Image arr Binary Bit) TGA where+ decode _ = fmap toImageBinary . jpImageY8ToImage . JP.decodeTga++instance Array arr Y Word8 => Readable (Image arr Y Word8) TGA where+ decode _ = jpImageY8ToImage . JP.decodeTga++instance Array arr RGB Word8 => Readable (Image arr RGB Word8) TGA where+ decode _ = jpImageRGB8ToImage . JP.decodeTga++instance Array arr RGBA Word8 => Readable (Image arr RGBA Word8) TGA where+ decode _ = jpImageRGBA8ToImage . JP.decodeTga++instance Array arr Y Double => Readable (Image arr Y Double) TGA where+ decode _ = jpDynamicImageToImage . JP.decodeTga++instance Array arr YA Double => Readable (Image arr YA Double) TGA where+ decode _ = jpDynamicImageToImage . JP.decodeTga++instance Array arr RGB Double => Readable (Image arr RGB Double) TGA where+ decode _ = jpDynamicImageToImage . JP.decodeTga++instance Array arr RGBA Double => Readable (Image arr RGBA Double) TGA where+ decode _ = jpDynamicImageToImage . JP.decodeTga+++-- TIF Format Reading++instance (Array arr Y Word8, Array arr Binary Bit) => Readable (Image arr Binary Bit) TIF where+ decode _ = fmap toImageBinary . jpImageY8ToImage . JP.decodeTiff++instance Array arr Y Word8 => Readable (Image arr Y Word8) TIF where+ decode _ = jpImageY8ToImage . JP.decodeTiff++instance Array arr Y Word16 => Readable (Image arr Y Word16) TIF where+ decode _ = jpImageY16ToImage . JP.decodeTiff++instance Array arr YA Word8 => Readable (Image arr YA Word8) TIF where+ decode _ = jpImageYA8ToImage . JP.decodeTiff++instance Array arr YA Word16 => Readable (Image arr YA Word16) TIF where+ decode _ = jpImageYA16ToImage . JP.decodeTiff++instance Array arr RGB Word8 => Readable (Image arr RGB Word8) TIF where+ decode _ = jpImageRGB8ToImage . JP.decodeTiff++instance Array arr RGB Word16 => Readable (Image arr RGB Word16) TIF where+ decode _ = jpImageRGB16ToImage . JP.decodeTiff++instance Array arr RGBA Word8 => Readable (Image arr RGBA Word8) TIF where+ decode _ = jpImageRGBA8ToImage . JP.decodeTiff++instance Array arr RGBA Word16 => Readable (Image arr RGBA Word16) TIF where+ decode _ = jpImageRGBA16ToImage . JP.decodeTiff++instance Array arr CMYK Word8 => Readable (Image arr CMYK Word8) TIF where+ decode _ = jpImageCMYK8ToImage . JP.decodeTiff++instance Array arr CMYK Word16 => Readable (Image arr CMYK Word16) TIF where+ decode _ = jpImageCMYK16ToImage . JP.decodeTiff+++instance Array arr Y Double => Readable (Image arr Y Double) TIF where+ decode _ = jpDynamicImageToImage . JP.decodeTiff++instance Array arr YA Double => Readable (Image arr YA Double) TIF where+ decode _ = jpDynamicImageToImage . JP.decodeTiff++instance Array arr RGB Double => Readable (Image arr RGB Double) TIF where+ decode _ = jpDynamicImageToImage . JP.decodeTiff++instance Array arr RGBA Double => Readable (Image arr RGBA Double) TIF where+ decode _ = jpDynamicImageToImage . JP.decodeTiff++++-- General decoding and helper functions++jpImageToImage :: (Array arr cs e, Convertible jpx (Pixel cs e), JP.Pixel jpx) =>+ JP.Image jpx -> Image arr cs e+jpImageToImage jimg = makeImage (JP.imageHeight jimg, JP.imageWidth jimg) getPx+ where getPx (y, x) = convert $ JP.pixelAt jimg x y+++jpImageY8ToImage :: Array arr Y Word8 =>+ Either String JP.DynamicImage -> Either String (Image arr Y Word8)+jpImageY8ToImage (Right (JP.ImageY8 jimg)) = Right (jpImageToImage jimg)+jpImageY8ToImage jimg = jpCSError "Y8 (Pixel Y Word8)" jimg+++jpImageY16ToImage :: Array arr Y Word16 =>+ Either String JP.DynamicImage -> Either String (Image arr Y Word16)+jpImageY16ToImage (Right (JP.ImageY16 jimg)) = Right (jpImageToImage jimg)+jpImageY16ToImage jimg = jpCSError "Y16 (Pixel Y Word16)" jimg++{- -- No JuicyPixels images are actually read in this type+jpImageYFToImage :: Array arr Y Float =>+ Either String JP.DynamicImage -> Either String (Image arr Y Float)+jpImageYFToImage (Right (JP.ImageYF jimg)) = Right (jpImageToImage jimg)+jpImageYFToImage jimg = jpCSError "YF (Pixel Y Float)" jimg+-}++jpImageYA8ToImage :: Array arr YA Word8 =>+ Either String JP.DynamicImage -> Either String (Image arr YA Word8)+jpImageYA8ToImage (Right (JP.ImageYA8 jimg)) = Right (jpImageToImage jimg)+jpImageYA8ToImage jimg = jpCSError "YA8 (Pixel YA Word8)" jimg+++jpImageYA16ToImage :: Array arr YA Word16 =>+ Either String JP.DynamicImage -> Either String (Image arr YA Word16)+jpImageYA16ToImage (Right (JP.ImageYA16 jimg)) = Right (jpImageToImage jimg)+jpImageYA16ToImage jimg = jpCSError "YA16 (Pixel YA Word16)" jimg+++jpImageRGB8ToImage :: Array arr RGB Word8 =>+ Either String JP.DynamicImage -> Either String (Image arr RGB Word8)+jpImageRGB8ToImage (Right (JP.ImageRGB8 jimg)) = Right (jpImageToImage jimg)+jpImageRGB8ToImage jimg = jpCSError "RGB8 (Pixel RGB Word8)" jimg+++jpImageRGB16ToImage :: Array arr RGB Word16 =>+ Either String JP.DynamicImage -> Either String (Image arr RGB Word16)+jpImageRGB16ToImage (Right (JP.ImageRGB16 jimg)) = Right (jpImageToImage jimg)+jpImageRGB16ToImage jimg = jpCSError "RGB16 (Pixel RGB Word16)" jimg+++jpImageRGBFToImage :: Array arr RGB Float =>+ Either String JP.DynamicImage -> Either String (Image arr RGB Float)+jpImageRGBFToImage (Right (JP.ImageRGBF jimg)) = Right (jpImageToImage jimg)+jpImageRGBFToImage jimg = jpCSError "RGBF (Pixel RGB Float)" jimg+++jpImageRGBA8ToImage :: Array arr RGBA Word8 =>+ Either String JP.DynamicImage -> Either String (Image arr RGBA Word8)+jpImageRGBA8ToImage (Right (JP.ImageRGBA8 jimg)) = Right (jpImageToImage jimg)+jpImageRGBA8ToImage jimg = jpCSError "RGBA8 (Pixel RGBA Word8)" jimg+++jpImageRGBA16ToImage :: Array arr RGBA Word16 =>+ Either String JP.DynamicImage -> Either String (Image arr RGBA Word16)+jpImageRGBA16ToImage (Right (JP.ImageRGBA16 jimg)) = Right (jpImageToImage jimg)+jpImageRGBA16ToImage jimg = jpCSError "RGBA16 (Pixel RGBA Word16)" jimg+++jpImageYCbCr8ToImage :: Array arr YCbCr Word8 =>+ Either String JP.DynamicImage -> Either String (Image arr YCbCr Word8)+jpImageYCbCr8ToImage (Right (JP.ImageYCbCr8 jimg)) = Right (jpImageToImage jimg)+jpImageYCbCr8ToImage jimg = jpCSError "YCbCr8 (Pixel YCbCr Word8)" jimg+++jpImageCMYK8ToImage :: Array arr CMYK Word8 =>+ Either String JP.DynamicImage -> Either String (Image arr CMYK Word8)+jpImageCMYK8ToImage (Right (JP.ImageCMYK8 jimg)) = Right (jpImageToImage jimg)+jpImageCMYK8ToImage jimg = jpCSError "CMYK8 (Pixel CMYK Word8)" jimg+++jpImageCMYK16ToImage :: Array arr CMYK Word16 =>+ Either String JP.DynamicImage -> Either String (Image arr CMYK Word16)+jpImageCMYK16ToImage (Right (JP.ImageCMYK16 jimg)) = Right (jpImageToImage jimg)+jpImageCMYK16ToImage jimg = jpCSError "CMYK16 (Pixel CMYK Word16)" jimg+++jpDynamicImageToImage' :: (Convertible JP.PixelCMYK16 (Pixel cs e),+ Convertible JP.PixelCMYK8 (Pixel cs e),+ Convertible JP.PixelRGB16 (Pixel cs e),+ Convertible JP.PixelRGB8 (Pixel cs e),+ Convertible JP.PixelRGBA16 (Pixel cs e),+ Convertible JP.PixelRGBA8 (Pixel cs e),+ Convertible JP.PixelRGBF (Pixel cs e),+ Convertible JP.PixelYA16 (Pixel cs e),+ Convertible JP.PixelYA8 (Pixel cs e),+ Convertible JP.PixelYCbCr8 (Pixel cs e),+ Convertible JP.Pixel16 (Pixel cs e),+ Convertible JP.Pixel8 (Pixel cs e),+ Convertible JP.PixelF (Pixel cs e),+ Array arr cs e) =>+ JP.DynamicImage -> Image arr cs e+jpDynamicImageToImage' (JP.ImageY8 jimg) = jpImageToImage jimg+jpDynamicImageToImage' (JP.ImageY16 jimg) = jpImageToImage jimg+jpDynamicImageToImage' (JP.ImageYF jimg) = jpImageToImage jimg+jpDynamicImageToImage' (JP.ImageYA8 jimg) = jpImageToImage jimg+jpDynamicImageToImage' (JP.ImageYA16 jimg) = jpImageToImage jimg+jpDynamicImageToImage' (JP.ImageRGB8 jimg) = jpImageToImage jimg+jpDynamicImageToImage' (JP.ImageRGB16 jimg) = jpImageToImage jimg+jpDynamicImageToImage' (JP.ImageRGBF jimg) = jpImageToImage jimg+jpDynamicImageToImage' (JP.ImageRGBA8 jimg) = jpImageToImage jimg+jpDynamicImageToImage' (JP.ImageRGBA16 jimg) = jpImageToImage jimg+jpDynamicImageToImage' (JP.ImageYCbCr8 jimg) = jpImageToImage jimg+jpDynamicImageToImage' (JP.ImageCMYK8 jimg) = jpImageToImage jimg+jpDynamicImageToImage' (JP.ImageCMYK16 jimg) = jpImageToImage jimg+++jpDynamicImageToImage :: (Convertible JP.PixelCMYK16 (Pixel cs e),+ Convertible JP.PixelCMYK8 (Pixel cs e),+ Convertible JP.PixelRGB16 (Pixel cs e),+ Convertible JP.PixelRGB8 (Pixel cs e),+ Convertible JP.PixelRGBA16 (Pixel cs e),+ Convertible JP.PixelRGBA8 (Pixel cs e),+ Convertible JP.PixelRGBF (Pixel cs e),+ Convertible JP.PixelYA16 (Pixel cs e),+ Convertible JP.PixelYA8 (Pixel cs e),+ Convertible JP.PixelYCbCr8 (Pixel cs e),+ Convertible JP.Pixel16 (Pixel cs e),+ Convertible JP.Pixel8 (Pixel cs e),+ Convertible JP.PixelF (Pixel cs e), Array arr cs e) =>+ Either String JP.DynamicImage -> Either String (Image arr cs e)+jpDynamicImageToImage = either jpError (Right . jpDynamicImageToImage')+++jpImageShowCS :: JP.DynamicImage -> String+jpImageShowCS (JP.ImageY8 _) = "Y8 (Pixel Y Word8)"+jpImageShowCS (JP.ImageY16 _) = "Y16 (Pixel Y Word16)"+jpImageShowCS (JP.ImageYF _) = "YF (Pixel Y Float)"+jpImageShowCS (JP.ImageYA8 _) = "YA8 (Pixel YA Word8)"+jpImageShowCS (JP.ImageYA16 _) = "YA16 (Pixel YA Word16)"+jpImageShowCS (JP.ImageRGB8 _) = "RGB8 (Pixel RGB Word8)"+jpImageShowCS (JP.ImageRGB16 _) = "RGB16 (Pixel RGB Word16)"+jpImageShowCS (JP.ImageRGBF _) = "RGBF (Pixel RGB Float)"+jpImageShowCS (JP.ImageRGBA8 _) = "RGBA8 (Pixel RGBA Word8)"+jpImageShowCS (JP.ImageRGBA16 _) = "RGBA16 (Pixel RGBA Word16)"+jpImageShowCS (JP.ImageYCbCr8 _) = "YCbCr8 (Pixel YCbCr Word8)"+jpImageShowCS (JP.ImageCMYK8 _) = "CMYK8 (Pixel CMYK Word8)"+jpImageShowCS (JP.ImageCMYK16 _) = "CMYK16 (Pixel CMYK Word16)"+++jpError :: String -> Either String a+jpError err = Left ("JuicyPixel decoding error: "++err)+++jpCSError :: String -> Either String JP.DynamicImage -> Either String a+jpCSError _ (Left err) = jpError err+jpCSError cs (Right jimg) = jpError ("Input image is in "++(jpImageShowCS jimg)+++ ", cannot convert it to "++cs++" colorspace.")+++--------------------------------------------------------------------------------+-- Encoding images using JuicyPixels -------------------------------------------+--------------------------------------------------------------------------------++instance ManifestArray arr Y Word8 => Writable (Image arr Y Word8) BMP where+ encode _ _ = JP.encodeBitmap . imageToJPImage (convert :: Pixel Y Word8 -> JP.Pixel8) ++instance ManifestArray arr RGB Word8 => Writable (Image arr RGB Word8) BMP where+ encode _ _ = JP.encodeBitmap . imageToJPImage (convert :: Pixel RGB Word8 -> JP.PixelRGB8) ++instance ManifestArray arr RGBA Word8 => Writable (Image arr RGBA Word8) BMP where+ encode _ _ = JP.encodeBitmap . imageToJPImage (convert :: Pixel RGBA Word8 -> JP.PixelRGBA8) ++instance ManifestArray arr Binary Bit => Writable (Image arr Binary Bit) BMP where+ encode _ _ = JP.encodeBitmap . imageToJPImage ((convert :: Pixel Y Word8 -> JP.Pixel8)+ . fromPixelBinary)++instance ManifestArray arr Y Double => Writable (Image arr Y Double) BMP where+ encode _ _ = JP.encodeBitmap . imageToJPImage ((convert :: Pixel Y Word8 -> JP.Pixel8)+ . toWord8)++instance ManifestArray arr YA Double => Writable (Image arr YA Double) BMP where+ encode _ _ = JP.encodeBitmap . imageToJPImage ((convert :: Pixel Y Word8 -> JP.Pixel8)+ . toWord8 . dropAlpha)++instance ManifestArray arr RGB Double => Writable (Image arr RGB Double) BMP where+ encode _ _ = JP.encodeBitmap . imageToJPImage ((convert :: Pixel RGB Word8 -> JP.PixelRGB8)+ . toWord8)++instance ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) BMP where+ encode _ _ = JP.encodeBitmap . imageToJPImage ((convert :: Pixel RGBA Word8 -> JP.PixelRGBA8)+ . toWord8)++-- Writable GIF++encodeGIF :: ManifestArray arr cs e =>+ [SaveOption GIF] -> (Pixel cs e -> JP.PixelRGB8)+ -> Image arr cs e -> BL.ByteString+encodeGIF [] !conv =+ either error id . uncurry JP.encodeGifImageWithPalette .+ JP.palettize JP.defaultPaletteOptions . imageToJPImage conv+encodeGIF (GIFPalette palOpts:_) !conv =+ either error id . uncurry JP.encodeGifImageWithPalette .+ JP.palettize palOpts . imageToJPImage conv+++instance ManifestArray arr RGB Word8 => Writable (Image arr RGB Word8) GIF where+ encode _ opts = encodeGIF opts (convert :: Pixel RGB Word8 -> JP.PixelRGB8)+ +instance ManifestArray arr Y Double => Writable (Image arr Y Double) GIF where+ encode _ opts = encodeGIF opts ((convert :: Pixel RGB Word8 -> JP.PixelRGB8)+ . toWord8 . toPixelRGB)+ +instance ManifestArray arr YA Double => Writable (Image arr YA Double) GIF where+ encode _ opts = encodeGIF opts ((convert :: Pixel RGB Word8 -> JP.PixelRGB8)+ . toWord8 . toPixelRGB . dropAlpha)++instance ManifestArray arr RGB Double => Writable (Image arr RGB Double) GIF where+ encode _ opts = encodeGIF opts ((convert :: Pixel RGB Word8 -> JP.PixelRGB8)+ . toWord8)++instance ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) GIF where+ encode _ opts = encodeGIF opts ((convert :: Pixel RGB Word8 -> JP.PixelRGB8)+ . toWord8 . dropAlpha)+++encodeGIFs :: ManifestArray arr cs e =>+ [SaveOption [GIF]] -> (Pixel cs e -> JP.PixelRGB8)+ -> [(JP.GifDelay, Image arr cs e)] -> BL.ByteString+encodeGIFs !opts !conv =+ either error id . JP.encodeGifImages (getGIFsLoop opts) . map palletizeGif where+ getGIFsLoop [] = JP.LoopingNever+ getGIFsLoop (GIFsLooping loop:_) = loop+ getGIFsLoop (_:xs) = getGIFsLoop xs + getGIFsPal [] = JP.defaultPaletteOptions+ getGIFsPal (GIFsPalette palOpts:_) = palOpts+ getGIFsPal (_:xs) = getGIFsPal xs+ palletizeGif !(d, img) = (p, d, jimg) where + !(jimg, p) = JP.palettize (getGIFsPal opts) $ imageToJPImage conv img+++instance ManifestArray arr RGB Word8 => Writable [(JP.GifDelay, Image arr RGB Word8)] [GIF] where+ encode _ opts = encodeGIFs opts (convert :: Pixel RGB Word8 -> JP.PixelRGB8)++instance ManifestArray arr RGB Double => Writable [(JP.GifDelay, Image arr RGB Double)] [GIF] where+ encode _ opts = encodeGIFs opts ((convert :: Pixel RGB Word8 -> JP.PixelRGB8)+ . toWord8)++-- Writable HDR++instance ManifestArray arr RGB Float => Writable (Image arr RGB Float) HDR where+ encode _ _ = JP.encodeHDR . imageToJPImage (convert :: Pixel RGB Float -> JP.PixelRGBF) ++instance ManifestArray arr Y Double => Writable (Image arr Y Double) HDR where+ encode _ _ = JP.encodeHDR . imageToJPImage ((convert :: Pixel RGB Float -> JP.PixelRGBF)+ . toFloat . toPixelRGB)++instance ManifestArray arr YA Double => Writable (Image arr YA Double) HDR where+ encode _ _ = JP.encodeHDR . imageToJPImage ((convert :: Pixel RGB Float -> JP.PixelRGBF)+ . toFloat . toPixelRGB . dropAlpha)++instance ManifestArray arr RGB Double => Writable (Image arr RGB Double) HDR where+ encode _ _ = JP.encodeHDR . imageToJPImage ((convert :: Pixel RGB Float -> JP.PixelRGBF)+ . toFloat)++instance ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) HDR where+ encode _ _ = JP.encodeHDR . imageToJPImage ((convert :: Pixel RGB Float -> JP.PixelRGBF)+ . toFloat . dropAlpha)+ ++-- Writable JPG+++encodeJPG :: (JP.JpgEncodable px, ManifestArray arr cs e) =>+ [SaveOption JPG] -> (Pixel cs e -> px) -> Image arr cs e -> BL.ByteString+encodeJPG [] conv =+ JP.encodeDirectJpegAtQualityWithMetadata 100 M.mempty . imageToJPImage conv+encodeJPG (JPGQuality q:_) conv =+ JP.encodeDirectJpegAtQualityWithMetadata q M.mempty . imageToJPImage conv+++instance ManifestArray arr Y Word8 => Writable (Image arr Y Word8) JPG where+ encode _ opts = encodeJPG opts (convert :: Pixel Y Word8 -> JP.Pixel8)++instance ManifestArray arr RGB Word8 => Writable (Image arr RGB Word8) JPG where+ encode _ opts = encodeJPG opts (convert :: Pixel RGB Word8 -> JP.PixelRGB8) ++instance ManifestArray arr CMYK Word8 => Writable (Image arr CMYK Word8) JPG where+ encode _ opts = encodeJPG opts (convert :: Pixel CMYK Word8 -> JP.PixelCMYK8) + +instance ManifestArray arr YCbCr Word8 => Writable (Image arr YCbCr Word8) JPG where+ encode _ opts = encodeJPG opts (convert :: Pixel YCbCr Word8 -> JP.PixelYCbCr8) ++instance ManifestArray arr Y Double => Writable (Image arr Y Double) JPG where+ encode _ opts = encodeJPG opts ((convert :: Pixel Y Word8 -> JP.Pixel8)+ . toWord8) ++instance ManifestArray arr YA Double => Writable (Image arr YA Double) JPG where+ encode _ opts = encodeJPG opts ((convert :: Pixel Y Word8 -> JP.Pixel8)+ . toWord8 . dropAlpha) ++instance ManifestArray arr RGB Double => Writable (Image arr RGB Double) JPG where+ encode _ opts = encodeJPG opts ((convert :: Pixel RGB Word8 -> JP.PixelRGB8)+ . toWord8) ++instance ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) JPG where+ encode _ opts = encodeJPG opts ((convert :: Pixel RGB Word8 -> JP.PixelRGB8)+ . toWord8 . dropAlpha) +++-- Writable PNG++instance ManifestArray arr Binary Bit => Writable (Image arr Binary Bit) PNG where+ encode _ _ = JP.encodePng . imageToJPImage ((convert :: Pixel Y Word8 -> JP.Pixel8) + . fromPixelBinary)+ +instance ManifestArray arr Y Word8 => Writable (Image arr Y Word8) PNG where+ encode _ _ = JP.encodePng . imageToJPImage (convert :: Pixel Y Word8 -> JP.Pixel8) ++instance ManifestArray arr Y Word16 => Writable (Image arr Y Word16) PNG where+ encode _ _ = JP.encodePng . imageToJPImage (convert :: Pixel Y Word16 -> JP.Pixel16) ++instance ManifestArray arr YA Word8 => Writable (Image arr YA Word8) PNG where+ encode _ _ = JP.encodePng . imageToJPImage (convert :: Pixel YA Word8 -> JP.PixelYA8) ++instance ManifestArray arr YA Word16 => Writable (Image arr YA Word16) PNG where+ encode _ _ = JP.encodePng . imageToJPImage (convert :: Pixel YA Word16 -> JP.PixelYA16) ++instance ManifestArray arr RGB Word8 => Writable (Image arr RGB Word8) PNG where+ encode _ _ = JP.encodePng . imageToJPImage (convert :: Pixel RGB Word8 -> JP.PixelRGB8) ++instance ManifestArray arr RGB Word16 => Writable (Image arr RGB Word16) PNG where+ encode _ _ = JP.encodePng . imageToJPImage (convert :: Pixel RGB Word16 -> JP.PixelRGB16) ++instance ManifestArray arr RGBA Word8 => Writable (Image arr RGBA Word8) PNG where+ encode _ _ = JP.encodePng . imageToJPImage (convert :: Pixel RGBA Word8 -> JP.PixelRGBA8) ++instance ManifestArray arr RGBA Word16 => Writable (Image arr RGBA Word16) PNG where+ encode _ _ = JP.encodePng . imageToJPImage (convert :: Pixel RGBA Word16 -> JP.PixelRGBA16) +++instance ManifestArray arr Y Double => Writable (Image arr Y Double) PNG where+ encode _ _ = JP.encodePng . imageToJPImage ((convert :: Pixel Y Word16 -> JP.Pixel16)+ . toWord16)++instance ManifestArray arr YA Double => Writable (Image arr YA Double) PNG where+ encode _ _ = JP.encodePng . imageToJPImage ((convert :: Pixel YA Word16 -> JP.PixelYA16)+ . toWord16)++instance ManifestArray arr RGB Double => Writable (Image arr RGB Double) PNG where+ encode _ _ = JP.encodePng . imageToJPImage ((convert :: Pixel RGB Word16 -> JP.PixelRGB16)+ . toWord16)++instance ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) PNG where+ encode _ _ = JP.encodePng . imageToJPImage ((convert :: Pixel RGBA Word16 -> JP.PixelRGBA16)+ . toWord16)++-- Writable TGA++instance ManifestArray arr Binary Bit => Writable (Image arr Binary Bit) TGA where+ encode _ _ = JP.encodeTga . imageToJPImage ((convert :: Pixel Y Word8 -> JP.Pixel8)+ . fromPixelBinary)+ +instance ManifestArray arr Y Word8 => Writable (Image arr Y Word8) TGA where+ encode _ _ = JP.encodeTga . imageToJPImage (convert :: Pixel Y Word8 -> JP.Pixel8) ++instance ManifestArray arr RGB Word8 => Writable (Image arr RGB Word8) TGA where+ encode _ _ = JP.encodeTga . imageToJPImage (convert :: Pixel RGB Word8 -> JP.PixelRGB8) ++instance ManifestArray arr RGBA Word8 => Writable (Image arr RGBA Word8) TGA where+ encode _ _ = JP.encodeTga . imageToJPImage (convert :: Pixel RGBA Word8 -> JP.PixelRGBA8) +++instance ManifestArray arr Y Double => Writable (Image arr Y Double) TGA where+ encode _ _ = JP.encodeTga . imageToJPImage ((convert :: Pixel Y Word8 -> JP.Pixel8)+ . toWord8)++instance ManifestArray arr YA Double => Writable (Image arr YA Double) TGA where+ encode _ _ = JP.encodeTga . imageToJPImage ((convert :: Pixel Y Word8 -> JP.Pixel8)+ . toWord8 . dropAlpha)++instance ManifestArray arr RGB Double => Writable (Image arr RGB Double) TGA where+ encode _ _ = JP.encodeTga . imageToJPImage ((convert :: Pixel RGB Word8 -> JP.PixelRGB8)+ . toWord8)++instance ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) TGA where+ encode _ _ = JP.encodeTga . imageToJPImage ((convert :: Pixel RGBA Word8 -> JP.PixelRGBA8)+ . toWord8)++-- Writable TIF++instance ManifestArray arr Y Word8 => Writable (Image arr Y Word8) TIF where+ encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel Y Word8 -> JP.Pixel8) ++instance ManifestArray arr Y Word16 => Writable (Image arr Y Word16) TIF where+ encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel Y Word16 -> JP.Pixel16) ++instance ManifestArray arr YA Word8 => Writable (Image arr YA Word8) TIF where+ encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel YA Word8 -> JP.PixelYA8) ++instance ManifestArray arr YA Word16 => Writable (Image arr YA Word16) TIF where+ encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel YA Word16 -> JP.PixelYA16) ++instance ManifestArray arr RGB Word8 => Writable (Image arr RGB Word8) TIF where+ encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel RGB Word8 -> JP.PixelRGB8) ++instance ManifestArray arr RGB Word16 => Writable (Image arr RGB Word16) TIF where+ encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel RGB Word16 -> JP.PixelRGB16) ++instance ManifestArray arr RGBA Word8 => Writable (Image arr RGBA Word8) TIF where+ encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel RGBA Word8 -> JP.PixelRGBA8) ++instance ManifestArray arr RGBA Word16 => Writable (Image arr RGBA Word16) TIF where+ encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel RGBA Word16 -> JP.PixelRGBA16) ++instance ManifestArray arr YCbCr Word8 => Writable (Image arr YCbCr Word8) TIF where+ encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel YCbCr Word8 -> JP.PixelYCbCr8)+ +instance ManifestArray arr CMYK Word8 => Writable (Image arr CMYK Word8) TIF where+ encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel CMYK Word8 -> JP.PixelCMYK8) ++instance ManifestArray arr CMYK Word16 => Writable (Image arr CMYK Word16) TIF where+ encode _ _ = JP.encodeTiff . imageToJPImage (convert :: Pixel CMYK Word16 -> JP.PixelCMYK16) +++instance ManifestArray arr Binary Bit => Writable (Image arr Binary Bit) TIF where+ encode _ _ = JP.encodeTiff . imageToJPImage ((convert :: Pixel Y Word8 -> JP.Pixel8)+ . fromPixelBinary)+ +instance ManifestArray arr Y Double => Writable (Image arr Y Double) TIF where+ encode _ _ = JP.encodeTiff . imageToJPImage ((convert :: Pixel Y Word16 -> JP.Pixel16)+ . toWord16)++instance ManifestArray arr YA Double => Writable (Image arr YA Double) TIF where+ encode _ _ = JP.encodeTiff . imageToJPImage ((convert :: Pixel YA Word16 -> JP.PixelYA16)+ . toWord16)++instance ManifestArray arr RGB Double => Writable (Image arr RGB Double) TIF where+ encode _ _ = JP.encodeTiff . imageToJPImage ((convert :: Pixel RGB Word16 -> JP.PixelRGB16)+ . toWord16)++instance ManifestArray arr RGBA Double => Writable (Image arr RGBA Double) TIF where+ encode _ _ = JP.encodeTiff . imageToJPImage ((convert :: Pixel RGBA Word16 -> JP.PixelRGBA16)+ . toWord16)++instance ManifestArray arr YCbCr Double => Writable (Image arr YCbCr Double) TIF where+ encode _ _ = JP.encodeTiff . imageToJPImage ((convert :: Pixel YCbCr Word8 -> JP.PixelYCbCr8)+ . toWord8)++instance ManifestArray arr CMYK Double => Writable (Image arr CMYK Double) TIF where+ encode _ _ = JP.encodeTiff . imageToJPImage ((convert :: Pixel CMYK Word16 -> JP.PixelCMYK16)+ . toWord16)++++imageToJPImage :: (JP.Pixel a, ManifestArray arr cs e) =>+ (Pixel cs e -> a) -> Image arr cs e -> JP.Image a+imageToJPImage !f img@(dims -> (m, n)) = JP.generateImage g n m+ where g !j !i = f (index img (i, j))+ {-# INLINE g #-}+{-# INLINE imageToJPImage #-}+++
+ src/Graphics/Image/IO/Formats/Netpbm.hs view
@@ -0,0 +1,300 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE TypeFamilies #-}+-- |+-- Module : Graphics.Image.IO.Formats.Netpbm+-- Copyright : (c) Alexey Kuleshevich 2016+-- License : BSD3+-- Maintainer : Alexey Kuleshevich <lehins@yandex.ru>+-- Stability : experimental+-- Portability : non-portable+--+module Graphics.Image.IO.Formats.Netpbm (+ PBM(..), PGM(..), PPM(..)+ ) where+++import Graphics.Image.ColorSpace+import Graphics.Image.Interface hiding (map)+import Graphics.Image.IO.Base+import Foreign.Storable (Storable)+import qualified Data.ByteString as B (ByteString)+import qualified Graphics.Netpbm as PNM+import qualified Data.Vector.Storable as VS ((!), Vector)+++-- | Netpbm: portable bitmap image with @.pbm@ extension.+data PBM = PBM++instance ImageFormat PBM where+ data SaveOption PBM++ ext _ = ".pbm"+++-- | Netpbm: portable graymap image with @.pgm@ extension.+data PGM = PGM++instance ImageFormat PGM where+ data SaveOption PGM++ ext _ = ".pgm"+++-- | Netpbm: portable pixmap image with @.ppm@ extension.+data PPM = PPM++instance ImageFormat PPM where+ data SaveOption PPM++ ext _ = ".ppm"+++instance ImageFormat [PBM] where+ data SaveOption [PBM]++ ext _ = ".pbm"+++instance ImageFormat [PGM] where+ data SaveOption [PGM]++ ext _ = ".pgm"+++instance ImageFormat [PPM] where+ data SaveOption [PPM]++ ext _ = ".ppm"+++--------------------------------------------------------------------------------+-- Converting to and from Netpbm -----------------------------------------------+--------------------------------------------------------------------------------++-- -> Y (Double)++instance Convertible PNM.PbmPixel (Pixel Y Double) where+ convert (PNM.PbmPixel bool) = PixelY $ if bool then 0 else 1+ +instance Convertible PNM.PgmPixel8 (Pixel Y Double) where+ convert (PNM.PgmPixel8 w8) = toDouble . PixelY $ w8++instance Convertible PNM.PgmPixel16 (Pixel Y Double) where+ convert (PNM.PgmPixel16 w16) = toDouble . PixelY $ w16++instance Convertible PNM.PpmPixelRGB8 (Pixel Y Double) where+ convert (PNM.PpmPixelRGB8 r g b) = toPixelY . toDouble $ PixelRGB r g b++instance Convertible PNM.PpmPixelRGB16 (Pixel Y Double) where+ convert (PNM.PpmPixelRGB16 r g b) = toPixelY . toDouble $ PixelRGB r g b++-- -> YA (Double)++instance Convertible PNM.PbmPixel (Pixel YA Double) where+ convert = addAlpha 1 . (convert :: PNM.PbmPixel -> Pixel Y Double)+ +instance Convertible PNM.PgmPixel8 (Pixel YA Double) where+ convert = addAlpha 1 . (convert :: PNM.PgmPixel8 -> Pixel Y Double)++instance Convertible PNM.PgmPixel16 (Pixel YA Double) where+ convert = addAlpha 1 . (convert :: PNM.PgmPixel16 -> Pixel Y Double)++instance Convertible PNM.PpmPixelRGB8 (Pixel YA Double) where+ convert = addAlpha 1 . (convert :: PNM.PpmPixelRGB8 -> Pixel Y Double)++instance Convertible PNM.PpmPixelRGB16 (Pixel YA Double) where+ convert = addAlpha 1 . (convert :: PNM.PpmPixelRGB16 -> Pixel Y Double)++-- -> RGB (Double)++instance Convertible PNM.PbmPixel (Pixel RGB Double) where+ convert = toPixelRGB . (convert :: PNM.PbmPixel -> Pixel Y Double)+ +instance Convertible PNM.PgmPixel8 (Pixel RGB Double) where+ convert = toPixelRGB . (convert :: PNM.PgmPixel8 -> Pixel Y Double)++instance Convertible PNM.PgmPixel16 (Pixel RGB Double) where+ convert = toPixelRGB . (convert :: PNM.PgmPixel16 -> Pixel Y Double)++instance Convertible PNM.PpmPixelRGB8 (Pixel RGB Double) where+ convert (PNM.PpmPixelRGB8 r g b) = toDouble $ PixelRGB r g b++instance Convertible PNM.PpmPixelRGB16 (Pixel RGB Double) where+ convert (PNM.PpmPixelRGB16 r g b) = toDouble $ PixelRGB r g b+++-- -> RGBA (Double)++instance Convertible PNM.PbmPixel (Pixel RGBA Double) where+ convert = addAlpha 1 . (convert :: PNM.PbmPixel -> Pixel RGB Double)+ +instance Convertible PNM.PgmPixel8 (Pixel RGBA Double) where+ convert = addAlpha 1 . (convert :: PNM.PgmPixel8 -> Pixel RGB Double)++instance Convertible PNM.PgmPixel16 (Pixel RGBA Double) where+ convert = addAlpha 1 . (convert :: PNM.PgmPixel16 -> Pixel RGB Double)++instance Convertible PNM.PpmPixelRGB8 (Pixel RGBA Double) where+ convert = addAlpha 1 . (convert :: PNM.PpmPixelRGB8 -> Pixel RGB Double)++instance Convertible PNM.PpmPixelRGB16 (Pixel RGBA Double) where+ convert = addAlpha 1 . (convert :: PNM.PpmPixelRGB16 -> Pixel RGB Double)+++---- Exact precision conversions+++instance Convertible PNM.PbmPixel (Pixel Binary Bit) where+ convert (PNM.PbmPixel bool) = fromBool bool+ +instance Convertible PNM.PgmPixel8 (Pixel Y Word8) where+ convert (PNM.PgmPixel8 w8) = PixelY w8++instance Convertible PNM.PgmPixel16 (Pixel Y Word16) where+ convert (PNM.PgmPixel16 w16) = PixelY w16++instance Convertible PNM.PpmPixelRGB8 (Pixel RGB Word8) where+ convert (PNM.PpmPixelRGB8 r g b) = PixelRGB r g b++instance Convertible PNM.PpmPixelRGB16 (Pixel RGB Word16) where+ convert (PNM.PpmPixelRGB16 r g b) = PixelRGB r g b+++--------------------------------------------------------------------------------+-- Decoding images using Netpbm ------------------------------------------------+--------------------------------------------------------------------------------+++-- BMP Format Reading (general)++instance Array arr Y Double => Readable (Image arr Y Double) PBM where+ decode _ = either Left (Right . ppmToImageUsing (pnmDataToImage id) . head) . decodePnm++instance Array arr Y Double => Readable (Image arr Y Double) PGM where+ decode _ = either Left (Right . ppmToImageUsing (pnmDataToImage id) . head) . decodePnm++instance Array arr Y Double => Readable (Image arr Y Double) PPM where+ decode _ = either Left (Right . ppmToImageUsing (pnmDataToImage id) . head) . decodePnm++instance Array arr YA Double => Readable (Image arr YA Double) PPM where+ decode _ = either Left (Right . ppmToImageUsing (pnmDataToImage (addAlpha 1)) . head) . decodePnm++instance Array arr RGB Double => Readable (Image arr RGB Double) PPM where+ decode _ = either Left (Right . ppmToImageUsing (pnmDataToImage id) . head) . decodePnm++instance Array arr RGBA Double => Readable (Image arr RGBA Double) PPM where+ decode _ = either Left (Right . ppmToImageUsing (pnmDataToImage (addAlpha 1)) . head) . decodePnm++-- BMP Format Reading (exact)++instance Array arr Binary Bit => Readable (Image arr Binary Bit) PBM where+ decode _ = either Left (ppmToImageUsing pnmDataPBMToImage . head) . decodePnm++instance Array arr Y Word8 => Readable (Image arr Y Word8) PGM where+ decode _ = either Left (ppmToImageUsing pnmDataPGM8ToImage . head) . decodePnm++instance Array arr Y Word16 => Readable (Image arr Y Word16) PGM where+ decode _ = either Left (ppmToImageUsing pnmDataPGM16ToImage . head) . decodePnm++instance Array arr RGB Word8 => Readable (Image arr RGB Word8) PPM where+ decode _ = either Left (ppmToImageUsing pnmDataPPM8ToImage . head) . decodePnm++instance Array arr RGB Word16 => Readable (Image arr RGB Word16) PPM where+ decode _ = either Left (ppmToImageUsing pnmDataPPM16ToImage . head) . decodePnm+++instance Array arr Binary Bit => Readable [Image arr Binary Bit] [PBM] where+ decode _ = pnmToImagesUsing pnmDataPBMToImage++instance Array arr Y Word8 => Readable [Image arr Y Word8] [PGM] where+ decode _ = pnmToImagesUsing pnmDataPGM8ToImage++instance Array arr Y Word16 => Readable [Image arr Y Word16] [PGM] where+ decode _ = pnmToImagesUsing pnmDataPGM16ToImage++instance Array arr RGB Word8 => Readable [Image arr RGB Word8] [PPM] where+ decode _ = pnmToImagesUsing pnmDataPPM8ToImage++instance Array arr RGB Word16 => Readable [Image arr RGB Word16] [PPM] where+ decode _ = pnmToImagesUsing pnmDataPPM16ToImage+++pnmToImagesUsing :: (Int -> Int -> PNM.PpmPixelData -> Either [Char] b)+ -> B.ByteString -> Either String [b]+pnmToImagesUsing conv =+ either Left (Right . map (either error id . ppmToImageUsing conv)) . decodePnm+++getPx :: (Storable a, Convertible a b) => VS.Vector a -> Int -> (Int, Int) -> b+getPx v w (i, j) = convert (v VS.! (i * w + j))+++pnmDataToImage :: (Array arr cs e, Convertible PNM.PbmPixel px,+ Convertible PNM.PgmPixel16 px, Convertible PNM.PgmPixel8 px,+ Convertible PNM.PpmPixelRGB16 px, Convertible PNM.PpmPixelRGB8 px) =>+ (px -> Pixel cs e) -> Int -> Int -> PNM.PpmPixelData -> Image arr cs e+pnmDataToImage conv w h (PNM.PbmPixelData v) = makeImage (h, w) (conv . getPx v w)+pnmDataToImage conv w h (PNM.PgmPixelData8 v) = makeImage (h, w) (conv . getPx v w)+pnmDataToImage conv w h (PNM.PgmPixelData16 v) = makeImage (h, w) (conv . getPx v w)+pnmDataToImage conv w h (PNM.PpmPixelDataRGB8 v) = makeImage (h, w) (conv . getPx v w)+pnmDataToImage conv w h (PNM.PpmPixelDataRGB16 v) = makeImage (h, w) (conv . getPx v w)+++pnmDataPBMToImage :: (Array arr cs e, Convertible PNM.PbmPixel (Pixel cs e)) =>+ Int -> Int -> PNM.PpmPixelData -> Either String (Image arr cs e)+pnmDataPBMToImage w h (PNM.PbmPixelData v) = Right $ makeImage (h, w) (getPx v w)+pnmDataPBMToImage _ _ d = pnmCSError "Binary (Pixel Binary Bit)" d++pnmDataPGM8ToImage :: (Array arr cs e, Convertible PNM.PgmPixel8 (Pixel cs e)) =>+ Int -> Int -> PNM.PpmPixelData -> Either String (Image arr cs e)+pnmDataPGM8ToImage w h (PNM.PgmPixelData8 v) = Right $ makeImage (h, w) (getPx v w)+pnmDataPGM8ToImage _ _ d = pnmCSError "Y8 (Pixel Y Word8)" d++pnmDataPGM16ToImage :: (Array arr cs e, Convertible PNM.PgmPixel16 (Pixel cs e)) =>+ Int -> Int -> PNM.PpmPixelData -> Either String (Image arr cs e)+pnmDataPGM16ToImage w h (PNM.PgmPixelData16 v) = Right $ makeImage (h, w) (getPx v w)+pnmDataPGM16ToImage _ _ d = pnmCSError "Y16 (Pixel Y Word16)" d++pnmDataPPM8ToImage :: (Array arr cs e, Convertible PNM.PpmPixelRGB8 (Pixel cs e)) =>+ Int -> Int -> PNM.PpmPixelData -> Either String (Image arr cs e)+pnmDataPPM8ToImage w h (PNM.PpmPixelDataRGB8 v) = Right $ makeImage (h, w) (getPx v w)+pnmDataPPM8ToImage _ _ d = pnmCSError "RGB8 (Pixel RGB Word8)" d++pnmDataPPM16ToImage :: (Array arr cs e, Convertible PNM.PpmPixelRGB16 (Pixel cs e)) =>+ Int -> Int -> PNM.PpmPixelData -> Either String (Image arr cs e)+pnmDataPPM16ToImage w h (PNM.PpmPixelDataRGB16 v) = Right $ makeImage (h, w) (getPx v w)+pnmDataPPM16ToImage _ _ d = pnmCSError "RGB16 (Pixel RGB Word16)" d+++ppmToImageUsing :: (Int -> Int -> PNM.PpmPixelData -> t) -> PNM.PPM -> t+ppmToImageUsing conv (PNM.PPM { PNM.ppmHeader = PNM.PPMHeader { PNM.ppmWidth = w+ , PNM.ppmHeight = h }+ , PNM.ppmData = ppmData }) = conv w h ppmData+ ++decodePnm :: B.ByteString -> Either String [PNM.PPM]+decodePnm = pnmResultToImage . PNM.parsePPM where+ pnmResultToImage (Right ([], _)) = pnmError "Unknown"+ pnmResultToImage (Right (ppms, _)) = Right ppms+ pnmResultToImage (Left err) = pnmError err+++++pnmError :: String -> Either String a+pnmError err = Left ("Netpbm decoding error: "++err)+++pnmCSError :: String -> PNM.PpmPixelData -> Either String a+pnmCSError cs ppmData = pnmError ("Input image is in "++(pnmShowData ppmData)+++ ", cannot convert it to "++cs++" colorspace.")++pnmShowData :: PNM.PpmPixelData -> String+pnmShowData (PNM.PbmPixelData _) = "Binary (Pixel Binary Bit)"+pnmShowData (PNM.PgmPixelData8 _) = "Y8 (Pixel Y Word8)"+pnmShowData (PNM.PgmPixelData16 _) = "Y16 (Pixel Y Word16)"+pnmShowData (PNM.PpmPixelDataRGB8 _) = "RGB8 (Pixel RGB Word8)"+pnmShowData (PNM.PpmPixelDataRGB16 _) = "RGB8 (Pixel RGB Word8)"
src/Graphics/Image/IO/Histogram.hs view
@@ -1,4 +1,7 @@-{-# LANGUAGE FlexibleContexts, ScopedTypeVariables, ViewPatterns #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE ViewPatterns #-} -- | -- Module : Graphics.Image.IO.Histogram -- Copyright : (c) Alexey Kuleshevich 2016@@ -8,28 +11,26 @@ -- Portability : non-portable -- module Graphics.Image.IO.Histogram (- Histogram(..), getHistograms, getHistogram,+ Histogram(..), Histograms, getHistograms, getHistogram, displayHistograms, writeHistograms ) where -import Prelude hiding (map, mapM_, zipWith)-import qualified Prelude as P (map, mapM_, zipWith)+import Prelude as P +import Control.Concurrent (forkIO) import Control.Monad.Primitive (PrimMonad (..))-import Graphics.Image.Interface+import Graphics.Image.Interface as I+import Graphics.Image.IO import Graphics.Image.ColorSpace-import Graphics.Image.IO.Base (displayProgram, spawnProcess) import Graphics.Rendering.Chart.Easy-import Graphics.Rendering.Chart.Backend.Cairo+import Graphics.Rendering.Chart.Backend.Diagrams import qualified Data.Colour as C import qualified Data.Vector.Unboxed as V import qualified Data.Vector.Unboxed.Mutable as MV-import Data.IORef-import Control.Concurrent (forkIO, ThreadId)-import System.Exit (ExitCode(ExitSuccess))-import System.Process (waitForProcess, showCommandForUser)-import System.IO.Temp (withSystemTempDirectory)+import System.Directory (getTemporaryDirectory) import System.FilePath ((</>))+import System.IO.Temp (createTempDirectory) + -- | A single channel histogram of an image. data Histogram = Histogram { hBins :: V.Vector Int -- ^ Vector containing pixel counts. Index of a@@ -40,13 +41,15 @@ , hColour :: C.AlphaColour Double -- ^ Color of a plotted line. }-+-- | For now it is just a type synonym, but in the future it might become a custom+-- data type with fields like title, width, heigth, etc.+type Histograms = [Histogram] -- | Create a histogram per channel with 256 bins each. getHistograms :: forall arr cs e . (SequentialArray arr Gray e, SequentialArray arr cs e, Elevator e) => Image arr cs e- -> [Histogram]+ -> Histograms getHistograms = P.zipWith setCh (enumFrom (toEnum 0) :: [cs]) . P.map getHistogram . toGrayImages where setCh cs h = h { hName = show cs , hColour = csColour cs }@@ -60,56 +63,52 @@ (1 + fromIntegral (maxBound :: Word8)) (0 :: Int) , hName = show Gray , hColour = csColour Gray } where- incBin v (toWord8 -> (PixelGray g)) = modify v (+1) $ fromIntegral g- countBins v = mapM_ (incBin v) img+ incBin v (toWord8 -> PixelGray g) = modify v (+1) $ fromIntegral g+ countBins v = I.mapM_ (incBin v) img -- | Write histograms into a PNG image file. -- -- >>> frog <- readImageRGB "images/frog.jpg"--- >>> writeHistograms "images/frog_histogram.png" $ getHistograms frog+-- >>> writeHistograms "images/frog_histogram.svg" $ getHistograms frog ----- <<images/frog_histogram.png>>+-- <<images/frog_histogram.svg>> ---writeHistograms :: FilePath -> [Histogram] -> IO ()-writeHistograms fileName hists = toFile def fileName $ do- layout_title .= "Histogram"- setColors $ P.map hColour hists- let axis = set la_nTicks 20 . set la_nLabels 14- layout_x_axis . laxis_generate .= scaledIntAxis (axis defaultIntAxis) (0, 260)- P.mapM_ plotHist hists where- plotHist h = plot (line (hName h) [V.toList $ V.imap (,) $ hBins h])- +writeHistograms :: FilePath -> Histograms -> IO ()+writeHistograms fileName hists =+ toFile def fileName $ do+ layout_title .= "Histogram"+ setColors $ P.map hColour hists+ let axis = set la_nTicks 20 . set la_nLabels 14+ layout_x_axis . laxis_generate .= scaledIntAxis (axis defaultIntAxis) (0, 260)+ let plotHist h = plot $ line (hName h) [V.toList . V.imap (,) $ hBins h]+ P.mapM_ plotHist hists --- | Display image histograms using an external program. Works the same way as+-- | Display image histograms using an external program. Works in a similar way as -- `Graphics.Image.IO.displayImage`. -- -- >>> frog <- readImageRGB "images/frog.jpg" -- >>> displayHistograms $ getHistograms frog ---displayHistograms :: [Histogram] -> IO (Maybe ThreadId)-displayHistograms hists = do- (program, block) <- readIORef displayProgram- let displayAction = withSystemTempDirectory "hip" (displayUsing hists program)- if block- then displayAction >> return Nothing- else Just <$> forkIO displayAction+displayHistograms :: Histograms -> IO ()+displayHistograms = displayHistogramsUsing defaultViewer False --- | IO action that writes histogram to file into a system temporary directory--- and spawns an external program that displays it. File is deleted after--- program is closed.-displayUsing :: [Histogram] -> String -> FilePath -> IO ()-displayUsing hists program path = do- let path' = path </> "tmp-hist.png"- writeHistograms path' hists- ph <- spawnProcess program [path']- e <- waitForProcess ph- let printExit ExitSuccess = return ()- printExit exitCode = do- putStrLn $ showCommandForUser program [path']- print exitCode- printExit e+-- | Display image histograms using an external program. Works in a similar way as+-- `Graphics.Image.IO.displayImageUsing`.+displayHistogramsUsing :: ExternalViewer+ -> Bool+ -> Histograms -> IO ()+displayHistogramsUsing viewer block hists = do+ let display = do+ tmpDir <- getTemporaryDirectory+ histPath <- (</> "tmp-hist.svg") <$> createTempDirectory tmpDir "hip-histogram"+ writeHistograms histPath hists+ displayImageFile viewer histPath+ if block+ then display+ else forkIO display >> return ()+ -- | Used for backwards compatibility with vector.
src/Graphics/Image/Interface.hs view
@@ -1,6 +1,17 @@-{-# LANGUAGE CPP, BangPatterns, ConstraintKinds, FlexibleContexts, FlexibleInstances,- MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,- UndecidableInstances, ViewPatterns #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE UndecidableInstances #-}+#if __GLASGOW_HASKELL__ >= 800+ {-# OPTIONS_GHC -Wno-redundant-constraints #-}+ {-# LANGUAGE UndecidableSuperClasses #-}+#endif+{-# LANGUAGE ViewPatterns #-} -- | -- Module : Graphics.Image.Interface -- Copyright : (c) Alexey Kuleshevich 2016@@ -13,8 +24,7 @@ ColorSpace(..), Alpha(..), Elevator(..), Array(..), ManifestArray(..), SequentialArray(..), MutableArray(..), Exchangable(..),- defaultIndex, maybeIndex, Border(..), borderIndex,- Applicative(..), (<$>), (<$), (<**>), liftA, liftA2, liftA3,+ defaultIndex, borderIndex, maybeIndex, Border(..), handleBorderIndex, ) where import Prelude hiding (and, map, zipWith, sum, product)@@ -139,10 +149,10 @@ -- | Create an Image by supplying it's dimensions and a pixel generating -- function. makeImage :: (Int, Int) -- ^ (@m@ rows, @n@ columns) - dimensions of a new image.- -> ((Int, Int) -> Pixel cs e)- -- ^ A function that takes (@i@-th row, and @j@-th column) as an- -- argument and returns a pixel for that location.- -> Image arr cs e+ -> ((Int, Int) -> Pixel cs e)+ -- ^ A function that takes (@i@-th row, and @j@-th column) as an+ -- argument and returns a pixel for that location.+ -> Image arr cs e -- | Create a singleton image, required for various operations on images with -- a scalar.@@ -375,12 +385,12 @@ -- | Border handling function. If @(i, j)@ location is within bounds, then supplied -- lookup function will be used, otherwise it will be handled according to a -- supplied border strategy.-borderIndex :: Border (Pixel cs e) -- ^ Border handling strategy.+handleBorderIndex :: Border (Pixel cs e) -- ^ Border handling strategy. -> (Int, Int) -- ^ Image dimensions -> ((Int, Int) -> Pixel cs e) -- ^ Image's indexing function. -> (Int, Int) -- ^ @(i, j)@ location of a pixel lookup. -> Pixel cs e-borderIndex border !(m, n) !getPx !(i, j) =+handleBorderIndex border !(m, n) !getPx !(i, j) = if i >= 0 && j >= 0 && i < m && j < n then getPx (i, j) else getPxB border where getPxB (Fill px) = px getPxB Wrap = getPx (i `mod` m, j `mod` n)@@ -395,18 +405,26 @@ if j < 0 then abs j `mod` n else if j >= n then n - (j - n + 2) `mod` n else j) {-# INLINE getPxB #-}-{-# INLINE borderIndex #-}+{-# INLINE handleBorderIndex #-} -- | Image indexing function that returns a default pixel if index is out of bounds. defaultIndex :: ManifestArray arr cs e => Pixel cs e -> Image arr cs e -> (Int, Int) -> Pixel cs e-defaultIndex !px !img = borderIndex (Fill px) (dims img) (index img)+defaultIndex !px !img = handleBorderIndex (Fill px) (dims img) (index img) {-# INLINE defaultIndex #-} --- | Image indexing function that returns 'Nothing' if index is out of bounds,--- 'Just' pixel otherwise.+-- | Image indexing function that uses a special border resolutions strategy for+-- out of bounds pixels.+borderIndex :: ManifestArray arr cs e =>+ Border (Pixel cs e) -> Image arr cs e -> (Int, Int) -> Pixel cs e+borderIndex !atBorder !img = handleBorderIndex atBorder (dims img) (index img)+{-# INLINE borderIndex #-}+++-- | Image indexing function that returns @'Nothing'@ if index is out of bounds,+-- @'Just' px@ otherwise. maybeIndex :: ManifestArray arr cs e => Image arr cs e -> (Int, Int) -> Maybe (Pixel cs e) maybeIndex !img@(dims -> (m, n)) !(i, j) =@@ -532,7 +550,7 @@ {-# INLINE fromInteger#-} -instance (Fractional (Pixel cs e), Fractional e, Array arr cs e) =>+instance (Fractional (Pixel cs e), Array arr cs e) => Fractional (Image arr cs e) where (/) = zipWith (/) {-# INLINE (/) #-}@@ -541,7 +559,7 @@ {-# INLINE fromRational #-} -instance (Floating (Pixel cs e), Floating e, Array arr cs e) =>+instance (Floating (Pixel cs e), Array arr cs e) => Floating (Image arr cs e) where pi = singleton pi {-# INLINE pi #-}
src/Graphics/Image/Interface/Repa/Internal.hs view
@@ -1,7 +1,14 @@ {-# OPTIONS -fno-warn-orphans #-}-{-# LANGUAGE CPP, BangPatterns, ConstraintKinds, FlexibleContexts, FlexibleInstances,- MultiParamTypeClasses, ScopedTypeVariables, TypeFamilies,- UndecidableInstances, ViewPatterns #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE UndecidableInstances #-}+{-# LANGUAGE ViewPatterns #-} -- | -- Module : Graphics.Image.Interface.Repa.Internal -- Copyright : (c) Alexey Kuleshevich 2016@@ -29,9 +36,7 @@ import qualified Data.Vector.Unboxed as V ((!)) import Data.Function (on) import Data.Typeable (Typeable)-import Data.Array.Repa hiding (- Array, map, zipWith, rank, index, traverse, (++), computeP, computeS, delay,- traverse, traverse2, transpose, backpermute)+import Data.Array.Repa.Index import qualified Data.Array.Repa as R import qualified Data.Array.Repa.Eval as R (Elt(..), suspendedComputeP) @@ -60,18 +65,18 @@ R.Elt (Pixel cs e), Unbox (Pixel cs e)) data Image RD cs e = RScalar !(Pixel cs e)- | RUImage !(R.Array U DIM2 (Pixel cs e))- | RDImage !(R.Array D DIM2 (Pixel cs e))+ | RUImage !(R.Array R.U R.DIM2 (Pixel cs e))+ | RDImage !(R.Array R.D R.DIM2 (Pixel cs e)) dims (RScalar _ ) = (1, 1)- dims (RUImage (extent -> (Z :. m :. n))) = (m, n)- dims (RDImage (extent -> (Z :. m :. n))) = (m, n)+ dims (RUImage (R.extent -> (Z :. m :. n))) = (m, n)+ dims (RDImage (R.extent -> (Z :. m :. n))) = (m, n) {-# INLINE dims #-} singleton = RScalar {-# INLINE singleton #-} - makeImage !(m, n) !f = RDImage $ fromFunction (Z :. m :. n) (f . shT2)+ makeImage !(m, n) !f = RDImage $ R.fromFunction (Z :. m :. n) (f . shT2) {-# INLINE makeImage #-} map f (RScalar px) = RScalar (f px)@@ -79,7 +84,7 @@ {-# INLINE map #-} imap f (RScalar px) = RScalar (f (0, 0) px)- imap f (getDelayed -> arr) = RDImage (R.zipWith f (R.fromFunction (extent arr) shT2) arr)+ imap f (getDelayed -> arr) = RDImage (R.zipWith f (R.fromFunction (R.extent arr) shT2) arr) {-# INLINE imap #-} zipWith f (RScalar px1) (RScalar px2) = RScalar (f px1 px2)@@ -109,7 +114,7 @@ transpose (RDImage arr) = RDImage (R.transpose arr) transpose (RUImage arr) = RDImage (R.transpose arr)- transpose img = img+ transpose !img = img {-# INLINE transpose #-} backpermute _ _ img@(RScalar _) = img@@ -227,7 +232,7 @@ index _ _ = _errorCompute {-# INLINE index #-} - deepSeqImage (RSImage (RUImage arr)) = deepSeqArray arr+ deepSeqImage (RSImage (RUImage arr)) = R.deepSeqArray arr deepSeqImage (RSImage (RScalar px)) = seq px deepSeqImage _ = _errorCompute {-# INLINE deepSeqImage #-}@@ -254,7 +259,7 @@ index _ _ = _errorCompute {-# INLINE index #-} - deepSeqImage (RPImage (RUImage arr)) = deepSeqArray arr+ deepSeqImage (RPImage (RUImage arr)) = R.deepSeqArray arr deepSeqImage (RPImage (RScalar px)) = seq px deepSeqImage _ = _errorCompute {-# INLINE deepSeqImage #-}@@ -419,11 +424,11 @@ if n1 /= m2 then error ("Inner dimensions of multiplied images must be the same, but received: "++ show img1 ++" X "++ show img2)- else RDImage . fromFunction (Z :. m1 :. n2) $ getPx where- (Z :. m1 :. n1) = extent arr1- (Z :. m2 :. n2) = extent arr2+ else RDImage . R.fromFunction (Z :. m1 :. n2) $ getPx where+ (Z :. m1 :. n1) = R.extent arr1+ (Z :. m2 :. n2) = R.extent arr2 getPx (Z :. i :. j) =- sumAllS (slice arr1 (Any :. (i :: Int) :. All) *^ slice arr2 (Any :. (j :: Int)))+ R.sumAllS (R.slice arr1 (R.Any :. (i :: Int) :. R.All) R.*^ R.slice arr2 (R.Any :. (j :: Int))) {-# INLINE getPx #-} mult _ _ = _errorCompute {-# INLINE mult #-}@@ -445,7 +450,7 @@ {-# INLINE suspendedComputeP #-} -getDelayed :: Array RD cs e => Image RD cs e -> R.Array D DIM2 (Pixel cs e)+getDelayed :: Array RD cs e => Image RD cs e -> R.Array R.D DIM2 (Pixel cs e) getDelayed (RUImage arr) = R.delay arr getDelayed (RDImage arr) = arr getDelayed _ = error "Scalar image is not an array."@@ -453,14 +458,13 @@ -- | Create an image from a 2D Repa delayed array.-fromRepaArray :: (ColorSpace cs, Unbox (PixelElt cs e)) =>- R.Array D DIM2 (Pixel cs e) -> Image RD cs e+fromRepaArray :: R.Array R.D DIM2 (Pixel cs e) -> Image RD cs e fromRepaArray = RDImage -- | Retrieve an underlying Repa array from `RD` image type. toRepaArray :: (ColorSpace cs, Unbox (PixelElt cs e)) =>- Image RD cs e -> R.Array D DIM2 (Pixel cs e)+ Image RD cs e -> R.Array R.D DIM2 (Pixel cs e) toRepaArray (RUImage arr) = R.delay arr toRepaArray (RDImage arr) = arr toRepaArray (RScalar px) = R.fromFunction (Z :. 1 :. 1) $ const px
src/Graphics/Image/Interface/Vector/Unboxed.hs view
@@ -1,6 +1,12 @@-{-# LANGUAGE BangPatterns, ConstraintKinds, FlexibleContexts, FlexibleInstances,- MultiParamTypeClasses, RankNTypes, TypeFamilies, UndecidableInstances,- ViewPatterns #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE UndecidableInstances #-}+{-# LANGUAGE ViewPatterns #-} -- | -- Module : Graphics.Image.Interface.Vector.Unboxed -- Copyright : (c) Alexey Kuleshevich 2016
src/Graphics/Image/Interface/Vector/Unboxing.hs view
@@ -1,5 +1,9 @@ {-# OPTIONS_GHC -fno-warn-orphans #-}-{-# LANGUAGE FlexibleContexts, MultiParamTypeClasses, TypeFamilies, UndecidableInstances #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE UndecidableInstances #-} -- | -- Module : Graphics.Image.Interface.Vector.Unboxing -- Copyright : (c) Alexey Kuleshevich 2016@@ -24,50 +28,53 @@ newtype instance U.MVector s Bit = MV_Bit (U.MVector s Word8) instance M.MVector U.MVector Bit where- {-# INLINE basicLength #-}- {-# INLINE basicUnsafeSlice #-}- {-# INLINE basicOverlaps #-}- {-# INLINE basicUnsafeNew #-}- {-# INLINE basicUnsafeReplicate #-}- {-# INLINE basicUnsafeRead #-}- {-# INLINE basicUnsafeWrite #-}- {-# INLINE basicClear #-}- {-# INLINE basicSet #-}- {-# INLINE basicUnsafeCopy #-}- {-# INLINE basicUnsafeMove #-}- {-# INLINE basicUnsafeGrow #-} basicLength (MV_Bit mvec) = M.basicLength mvec+ {-# INLINE basicLength #-} basicUnsafeSlice idx len (MV_Bit mvec) = MV_Bit (M.basicUnsafeSlice idx len mvec)+ {-# INLINE basicUnsafeSlice #-} basicOverlaps (MV_Bit mvec) (MV_Bit mvec') = M.basicOverlaps mvec mvec'+ {-# INLINE basicOverlaps #-} basicUnsafeNew len = MV_Bit `liftM` M.basicUnsafeNew len+ {-# INLINE basicUnsafeNew #-} basicUnsafeReplicate len (Bit w) = MV_Bit `liftM` M.basicUnsafeReplicate len w+ {-# INLINE basicUnsafeReplicate #-} basicUnsafeRead (MV_Bit mvec) idx = Bit `liftM` M.basicUnsafeRead mvec idx+ {-# INLINE basicUnsafeRead #-} basicUnsafeWrite (MV_Bit mvec) idx (Bit w) = M.basicUnsafeWrite mvec idx w+ {-# INLINE basicUnsafeWrite #-} basicClear (MV_Bit mvec) = M.basicClear mvec+ {-# INLINE basicClear #-} basicSet (MV_Bit mvec) (Bit w) = M.basicSet mvec w+ {-# INLINE basicSet #-} basicUnsafeCopy (MV_Bit mvec) (MV_Bit mvec') = M.basicUnsafeCopy mvec mvec'+ {-# INLINE basicUnsafeCopy #-} basicUnsafeMove (MV_Bit mvec) (MV_Bit mvec') = M.basicUnsafeMove mvec mvec'+ {-# INLINE basicUnsafeMove #-} basicUnsafeGrow (MV_Bit mvec) len = MV_Bit `liftM` M.basicUnsafeGrow mvec len+ {-# INLINE basicUnsafeGrow #-}+#if MIN_VERSION_vector(0,11,0)+ basicInitialize (MV_Bit mvec) = M.basicInitialize mvec+ {-# INLINE basicInitialize #-}+#endif - + newtype instance U.Vector Bit = V_Bit (U.Vector Word8) instance V.Vector U.Vector Bit where- {-# INLINE basicUnsafeFreeze #-}- {-# INLINE basicUnsafeThaw #-}- {-# INLINE basicLength #-}- {-# INLINE basicUnsafeSlice #-}- {-# INLINE basicUnsafeIndexM #-}- {-# INLINE basicUnsafeCopy #-}- {-# INLINE elemseq #-} basicUnsafeFreeze (MV_Bit mvec) = V_Bit `liftM` V.basicUnsafeFreeze mvec+ {-# INLINE basicUnsafeFreeze #-} basicUnsafeThaw (V_Bit vec) = MV_Bit `liftM` V.basicUnsafeThaw vec+ {-# INLINE basicUnsafeThaw #-} basicLength (V_Bit vec) = V.basicLength vec+ {-# INLINE basicLength #-} basicUnsafeSlice idx len (V_Bit vec) = V_Bit (V.basicUnsafeSlice idx len vec)+ {-# INLINE basicUnsafeSlice #-} basicUnsafeIndexM (V_Bit vec) idx = Bit `liftM` V.basicUnsafeIndexM vec idx+ {-# INLINE basicUnsafeIndexM #-} basicUnsafeCopy (MV_Bit mvec) (V_Bit vec) = V.basicUnsafeCopy mvec vec+ {-# INLINE basicUnsafeCopy #-} elemseq (V_Bit vec) (Bit w) = V.elemseq vec w-+ {-# INLINE elemseq #-} @@ -75,49 +82,52 @@ instance (ColorSpace cs, U.Unbox (PixelElt cs e)) => U.Unbox (Pixel cs e) newtype instance U.MVector s (Pixel cs e) = MV_Pixel (U.MVector s (PixelElt cs e))- -instance (ColorSpace cs_aOSR, U.Unbox (PixelElt cs_aOSR e))- => M.MVector U.MVector (Pixel cs_aOSR e) where- {-# INLINE basicLength #-}- {-# INLINE basicUnsafeSlice #-}- {-# INLINE basicOverlaps #-}- {-# INLINE basicUnsafeNew #-}- {-# INLINE basicUnsafeReplicate #-}- {-# INLINE basicUnsafeRead #-}- {-# INLINE basicUnsafeWrite #-}- {-# INLINE basicClear #-}- {-# INLINE basicSet #-}- {-# INLINE basicUnsafeCopy #-}- {-# INLINE basicUnsafeMove #-}- {-# INLINE basicUnsafeGrow #-}++instance (ColorSpace cs, U.Unbox (PixelElt cs e)) => M.MVector U.MVector (Pixel cs e) where basicLength (MV_Pixel mvec) = M.basicLength mvec+ {-# INLINE basicLength #-} basicUnsafeSlice idx len (MV_Pixel mvec) = MV_Pixel (M.basicUnsafeSlice idx len mvec)+ {-# INLINE basicUnsafeSlice #-} basicOverlaps (MV_Pixel mvec) (MV_Pixel mvec') = M.basicOverlaps mvec mvec'+ {-# INLINE basicOverlaps #-} basicUnsafeNew len = MV_Pixel `liftM` M.basicUnsafeNew len+ {-# INLINE basicUnsafeNew #-} basicUnsafeReplicate len val = MV_Pixel `liftM` M.basicUnsafeReplicate len (toElt val)+ {-# INLINE basicUnsafeReplicate #-} basicUnsafeRead (MV_Pixel mvec) idx = fromElt `liftM` M.basicUnsafeRead mvec idx+ {-# INLINE basicUnsafeRead #-} basicUnsafeWrite (MV_Pixel mvec) idx val = M.basicUnsafeWrite mvec idx (toElt val)+ {-# INLINE basicUnsafeWrite #-} basicClear (MV_Pixel mvec) = M.basicClear mvec+ {-# INLINE basicClear #-} basicSet (MV_Pixel mvec) val = M.basicSet mvec (toElt val)+ {-# INLINE basicSet #-} basicUnsafeCopy (MV_Pixel mvec) (MV_Pixel mvec') = M.basicUnsafeCopy mvec mvec'+ {-# INLINE basicUnsafeCopy #-} basicUnsafeMove (MV_Pixel mvec) (MV_Pixel mvec') = M.basicUnsafeMove mvec mvec'+ {-# INLINE basicUnsafeMove #-} basicUnsafeGrow (MV_Pixel mvec) len = MV_Pixel `liftM` M.basicUnsafeGrow mvec len+ {-# INLINE basicUnsafeGrow #-}+#if MIN_VERSION_vector(0,11,0)+ basicInitialize (MV_Pixel mvec) = M.basicInitialize mvec+ {-# INLINE basicInitialize #-}+#endif - -newtype instance U.Vector (Pixel cs_aOSR e) = V_Pixel (U.Vector (PixelElt cs_aOSR e))- ++newtype instance U.Vector (Pixel cs e) = V_Pixel (U.Vector (PixelElt cs e))+ instance (ColorSpace cs, U.Unbox (PixelElt cs e)) => V.Vector U.Vector (Pixel cs e) where- {-# INLINE basicUnsafeFreeze #-}- {-# INLINE basicUnsafeThaw #-}- {-# INLINE basicLength #-}- {-# INLINE basicUnsafeSlice #-}- {-# INLINE basicUnsafeIndexM #-}- {-# INLINE basicUnsafeCopy #-}- {-# INLINE elemseq #-} basicUnsafeFreeze (MV_Pixel mvec) = V_Pixel `liftM` V.basicUnsafeFreeze mvec+ {-# INLINE basicUnsafeFreeze #-} basicUnsafeThaw (V_Pixel vec) = MV_Pixel `liftM` V.basicUnsafeThaw vec+ {-# INLINE basicUnsafeThaw #-} basicLength (V_Pixel vec) = V.basicLength vec+ {-# INLINE basicLength #-} basicUnsafeSlice idx len (V_Pixel vec) = V_Pixel (V.basicUnsafeSlice idx len vec)+ {-# INLINE basicUnsafeSlice #-} basicUnsafeIndexM (V_Pixel vec) idx = fromElt `liftM` V.basicUnsafeIndexM vec idx+ {-# INLINE basicUnsafeIndexM #-} basicUnsafeCopy (MV_Pixel mvec) (V_Pixel vec) = V.basicUnsafeCopy mvec vec+ {-# INLINE basicUnsafeCopy #-} elemseq (V_Pixel vec) val = V.elemseq vec (toElt val)+ {-# INLINE elemseq #-}
src/Graphics/Image/Processing.hs view
@@ -1,4 +1,6 @@-{-# LANGUAGE CPP, BangPatterns, ViewPatterns #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE ViewPatterns #-} -- | -- Module : Graphics.Image.Processing -- Copyright : (c) Alexey Kuleshevich 2016
src/Graphics/Image/Processing/Binary.hs view
@@ -1,5 +1,12 @@-{-# LANGUAGE BangPatterns, FlexibleContexts, FlexibleInstances, FunctionalDependencies,- MultiParamTypeClasses #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE FunctionalDependencies #-}+{-# LANGUAGE MultiParamTypeClasses #-}+#if __GLASGOW_HASKELL__ >= 800+ {-# LANGUAGE UndecidableSuperClasses #-}+#endif -- | -- Module : Graphics.Image.Processing.Binary -- Copyright : (c) Alexey Kuleshevich 2016
src/Graphics/Image/Processing/Complex.hs view
@@ -1,4 +1,5 @@-{-# LANGUAGE BangPatterns, FlexibleContexts #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE FlexibleContexts #-} -- | -- Module : Graphics.Image.Processing.Complex -- Copyright : (c) Alexey Kuleshevich 2016@@ -28,7 +29,7 @@ infix 6 !+! --- | Constrcut a complex image from two images representing real and imaginary parts.+-- | Construct a complex image from two images representing real and imaginary parts. -- -- >>> frog <- readImageRGB "images/frog.jpg" -- >>> frog !+! 0@@ -42,13 +43,13 @@ {-# INLINE (!+!) #-} -- | Extracts the real part of a complex image.-realPart' :: (Array arr cs e, Array arr cs (Complex e), RealFloat e) =>+realPart' :: (Array arr cs e, Array arr cs (Complex e)) => Image arr cs (Complex e) -> Image arr cs e realPart' = map realPart {-# INLINE realPart' #-} -- | Extracts the imaginary part of a complex image.-imagPart' :: (Array arr cs e, Array arr cs (Complex e), RealFloat e) =>+imagPart' :: (Array arr cs e, Array arr cs (Complex e)) => Image arr cs (Complex e) -> Image arr cs e imagPart' = map imagPart {-# INLINE imagPart' #-}
src/Graphics/Image/Processing/Complex/Fourier.hs view
@@ -1,4 +1,7 @@-{-# LANGUAGE CPP, BangPatterns, ConstraintKinds, FlexibleContexts #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE FlexibleContexts #-} -- | -- Module : Graphics.Image.Processing.Complex.Fourier -- Copyright : (c) Alexey Kuleshevich 2016@@ -26,7 +29,7 @@ | Inverse -- | Fast Fourier Transform-fft :: (ManifestArray arr cs (Complex e), Num e, RealFloat e) =>+fft :: (ManifestArray arr cs (Complex e), RealFloat e) => Image arr cs (Complex e) -> Image arr cs (Complex e) fft = fft2d Forward@@ -34,7 +37,7 @@ -- | Inverse Fast Fourier Transform-ifft :: (ManifestArray arr cs (Complex e), Num e, RealFloat e) =>+ifft :: (ManifestArray arr cs (Complex e), RealFloat e) => Image arr cs (Complex e) -> Image arr cs (Complex e) ifft = fft2d Inverse
src/Graphics/Image/Processing/Convolution.hs view
@@ -27,7 +27,7 @@ !krnM2 = krnM `div` 2 !krnN2 = krnN `div` 2 !sz = dims img- getPxB !getPx !ix = borderIndex border sz getPx ix+ getPxB !getPx !ix = handleBorderIndex border sz getPx ix {-# INLINE getPxB #-} stencil !getKrnPx !getImgPx !(i, j) = integrate 0 0 0 where !ikrnM = i - krnM2
src/Graphics/Image/Processing/Geometric.hs view
@@ -1,4 +1,6 @@-{-# LANGUAGE CPP, BangPatterns, ViewPatterns #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE ViewPatterns #-} -- | -- Module : Graphics.Image.Processing.Geometric -- Copyright : (c) Alexey Kuleshevich 2016
src/Graphics/Image/Processing/Interpolation.hs view
@@ -1,4 +1,5 @@-{-# LANGUAGE BangPatterns, ViewPatterns #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE ViewPatterns #-} -- | -- Module : Graphics.Image.Processing.Interpolation -- Copyright : (c) Alexey Kuleshevich 2016@@ -38,14 +39,14 @@ instance Interpolation Nearest where interpolate (Nearest border) !sz !getPx !(round -> i, round -> j) =- borderIndex border sz getPx (i, j)+ handleBorderIndex border sz getPx (i, j) {-# INLINE interpolate #-} instance Interpolation Bilinear where interpolate (Bilinear border) !sz !getPx !(i, j) = fi0 + jPx*(fi1-fi0) where- getPx' = borderIndex border sz getPx+ getPx' = handleBorderIndex border sz getPx {-# INLINE getPx' #-} !(i0, j0) = (floor i, floor j) !(i1, j1) = (i0 + 1, j0 + 1)
src/Graphics/Image/Types.hs view
@@ -8,7 +8,7 @@ -- module Graphics.Image.Types ( module Graphics.Image.ColorSpace,- module Graphics.Image.IO.External,+ module Graphics.Image.IO.Formats, Array, Image, ManifestArray, SequentialArray, MutableArray, MImage, Exchangable, Border(..), VU(..), RD(..), RS(..), RP(..),@@ -19,4 +19,4 @@ import Graphics.Image.Interface import Graphics.Image.Interface.Vector (VU(..)) import Graphics.Image.Interface.Repa (RD(..), RS(..), RP(..))-import Graphics.Image.IO.External+import Graphics.Image.IO.Formats
+ tests/Graphics/Image/ColorSpaceSpec.hs view
@@ -0,0 +1,36 @@+{-# OPTIONS_GHC -fno-warn-orphans #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+module Graphics.Image.ColorSpaceSpec (spec) where++import Test.Hspec+import Test.QuickCheck+ +import Graphics.Image as I+import Graphics.Image.Interface as II+import Graphics.Image.ColorSpace+++instance Arbitrary RGB where+ arbitrary = do+ NonNegative c <- arbitrary+ return $ toEnum (c `mod` 3)++instance Arbitrary e => Arbitrary (Pixel RGB e) where+ arbitrary = PixelRGB <$> arbitrary <*> arbitrary <*> arbitrary+++instance (SequentialArray VU RGB e, Arbitrary e) => Arbitrary (Image VU RGB e) where+ arbitrary = do+ (Positive m, Positive n) <- arbitrary+ II.mapM (const arbitrary) $ I.makeImage (m, n) (const $ PixelGray (0 :: Double))+ ++prop_ToFromElt :: (ColorSpace cs, Arbitrary cs, Arbitrary (Pixel cs e), Eq (Pixel cs e)) =>+ Pixel cs e -> Bool+prop_ToFromElt px = px == fromElt (toElt px)+++spec :: Spec+spec = describe "ColorSpace" $ do+ it "RGBElt" $ property (prop_ToFromElt :: Pixel RGB Int -> Bool)
+ tests/Spec.hs view
@@ -0,0 +1,1 @@+{-# OPTIONS_GHC -F -pgmF hspec-discover #-}