Чтение изображения с JuicyPixels
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
module Main (main) where
|
||||
|
||||
import Codec.Picture
|
||||
import Lib
|
||||
|
||||
caesarShift :: Int
|
||||
@@ -18,4 +19,12 @@ main = do
|
||||
let encryptedTextFromBits = bitsToText encryptedTextBits
|
||||
putStrLn $ take 30 encryptedTextFromBits
|
||||
let decryptedText = decryptCaesar alphabet caesarShift encryptedTextFromBits
|
||||
putStrLn $ take 30 decryptedText
|
||||
putStrLn $ take 30 decryptedText
|
||||
|
||||
readImageResult <- readImage "resources/david.bmp"
|
||||
case readImageResult of
|
||||
Left err -> putStrLn $ "Ошибка при чтении изображения: " ++ err
|
||||
Right dynImg -> do
|
||||
let img = convertRGB8 dynImg
|
||||
putStrLn $ "Ширина: " ++ show (imageWidth img)
|
||||
putStrLn $ "Высота: " ++ show (imageHeight img)
|
||||
Reference in New Issue
Block a user