main formatting & cleanup
This commit is contained in:
parent
5f98759aee
commit
a1337127e0
1 changed files with 3 additions and 4 deletions
|
|
@ -105,7 +105,9 @@ deriving instance Generic (CL.RGB a)
|
|||
deriving instance NFData a => NFData (CL.RGB a)
|
||||
|
||||
toDimensionVector :: (Int.BaseArray arr cs e, Fractional n) => Image arr cs e -> SizeSpec V2 n
|
||||
toDimensionVector image = Diagrams.Prelude.dims $ p2 (fromIntegral $ cols image, fromIntegral $ rows image) .-. p2 (0.0, 0.0)
|
||||
toDimensionVector image =
|
||||
Diagrams.Prelude.dims $
|
||||
p2 (fromIntegral $ cols image, fromIntegral $ rows image) .-. p2 (0.0, 0.0)
|
||||
|
||||
data CLIOptions = CLIOptions
|
||||
{ input :: FilePath
|
||||
|
|
@ -119,11 +121,8 @@ instance ParseRecord CLIOptions
|
|||
main :: IO ()
|
||||
main = do
|
||||
CLIOptions{..} <- getRecord "image options"
|
||||
let (Options{gen = gen}) = defaultOpts
|
||||
gen' <- getStdGen -- for consistency, swap with something like: pure . mkStdGen $ 2344
|
||||
let gens :: [StdGen] = map fst . iterate (split . snd) . split $ gen'
|
||||
print gen'
|
||||
image <- Img.readImageRGB VU input
|
||||
let nums = zip gens $ map show [0 .. 60]
|
||||
let dimVector = toDimensionVector image
|
||||
renderSVG output dimVector (genImage' image gen' cornerCount)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue