ell input =
    P.imageToPng . P.ImageY8 $ encodeStringQRCodeImage pixelPerCell input


-- | 经常需要保存微信的文件内容及mime到本地
-- 这个类型及下面的工具函数为此而设
type FileContentAndMime = (LB.ByteString, MimeType)

saveWreqResponseContentAndMime :: (MonadIO m)
                                => Handle
                                -> Response LB.ByteString
       
encodeStringQRCodeImage :: (QRC.ToText a)
                        => Int
                        -> a
                        -> (P.Image P.Pixel8)
encodeStringQRCodeImage pixelPerCell input =
  QRJP.toImage 4 pixelPerCell $ fromMaybe (error "QRC.encodeTExt failed") $ QRC.encodeText (QRC.defaultQRCodeOptions QRC.M) QRC.Utf8WithoutECI input
encodeStringQRCodeImage pixelPerCell input =
  QRJP.toImage 4 pixelPerCell $ fromMaybe (error "QRC.encodeTExt failed") $ QRC.encodeText (QRC.defaultQRCodeOptions QRC.M) QRC.Utf8WithoutECI input