Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-02-27 09:54:46 × emmanuel_erc quits (~user@2603-7000-9600-01c9-c589-d024-9ed2-1840.res6.spectrum.com) (Read error: Connection reset by peer)
2021-02-27 09:55:22 emmanuel_erc joins (~user@2603-7000-9600-01c9-c589-d024-9ed2-1840.res6.spectrum.com)
2021-02-27 09:55:54 <Guest34200> hmm okay let me give it a shot
2021-02-27 09:56:24 <ij> make sure you have the frog! (.jpg)
2021-02-27 09:57:06 <Guest34200> how would I extract the pixel info from the image? I feel like i'm misunderstanding something lol
2021-02-27 09:57:21 <Guest34200> i'm assuming readImage already stores the pixels with double precision
2021-02-27 09:57:35 <Guest34200> I'm a bit lost on how to access said information and do stuff with it
2021-02-27 09:57:37 <ij> do you want to read a single pixel?
2021-02-27 09:57:46 <Guest34200> all of them
2021-02-27 09:58:10 <ij> well, I couldn't get readImage to work myself. Do you know what each bit of info in Image type variables means, btw?
2021-02-27 09:58:29 <Guest34200> you mean in Image VS Y Double ?
2021-02-27 09:58:32 <ij> yeah
2021-02-27 09:58:36 <Guest34200> uhhh
2021-02-27 09:58:44 <Guest34200> i think VS is how the image is represented
2021-02-27 09:58:56 <Guest34200> Y is for grayscale?
2021-02-27 09:59:05 <Guest34200> and double is how the pixels r represented
2021-02-27 09:59:08 <ij> cool
2021-02-27 09:59:14 <Guest34200> is that right
2021-02-27 09:59:26 × borne quits (~fritjof@2a06:8782:ffbb:1337:2133:4ed6:e22f:c3eb) (Ping timeout: 264 seconds)
2021-02-27 09:59:39 <ij> yes, I am not sure which specific kind of vector VS is, but I knew the VU one I am working with
2021-02-27 09:59:59 <ij> well, the docs outline many kinds of accessors: https://hackage.haskell.org/package/hip-1.5.6.0/docs/Graphics-Image.html#g:6
2021-02-27 10:00:19 int80h joins (uid148779@gateway/web/irccloud.com/x-yapefbeohzqydcto)
2021-02-27 10:00:38 ClaudiusMaximus joins (~claude@191.123.199.146.dyn.plus.net)
2021-02-27 10:00:38 × ClaudiusMaximus quits (~claude@191.123.199.146.dyn.plus.net) (Changing host)
2021-02-27 10:00:38 ClaudiusMaximus joins (~claude@unaffiliated/claudiusmaximus)
2021-02-27 10:01:02 <ij> what kind of reading are you looking for exactly?
2021-02-27 10:01:22 × emmanuel_erc quits (~user@2603-7000-9600-01c9-c589-d024-9ed2-1840.res6.spectrum.com) (Read error: Connection reset by peer)
2021-02-27 10:01:27 <Guest34200> to provide some more context, i want to represent the image as a 2d list of doubles [ [Double] ]
2021-02-27 10:01:41 <ij> you're looking for toLists
2021-02-27 10:01:56 emmanuel_erc joins (~user@2603-7000-9600-01c9-c589-d024-9ed2-1840.res6.spectrum.com)
2021-02-27 10:02:05 <Guest34200> ah
2021-02-27 10:02:16 <Guest34200> toLists :: MArray arr cs e => Image arr cs e -> [[Pixel cs e]]
2021-02-27 10:02:49 <ij> if you click on Pixel, you'll get docs on how to break that down further
2021-02-27 10:03:31 <Guest34200> ah so you can specify the colorspace and the precision
2021-02-27 10:04:01 <Guest34200> what is so special about MArray?
2021-02-27 10:04:18 <Guest34200> "Array representation that is actually has real data stored in memory, "
2021-02-27 10:04:19 Rudd0 joins (~Rudd0@185.189.115.108)
2021-02-27 10:06:39 psutcliffe joins (~psutcliff@2a00:801:3f2:4b56:e93e:1663:ff0c:6c42)
2021-02-27 10:07:01 <ij> the regular Arrays will probably be also stored in memory, but they'll have their operations defined in a pure way
2021-02-27 10:07:17 <Guest34200> right
2021-02-27 10:07:39 <tomsmeding> MArray stands for Mutable Array; note the 'write' method of the class
2021-02-27 10:07:58 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
2021-02-27 10:08:17 <Guest34200> ahh
2021-02-27 10:08:17 × emmanuel_erc quits (~user@2603-7000-9600-01c9-c589-d024-9ed2-1840.res6.spectrum.com) (Read error: Connection reset by peer)
2021-02-27 10:09:09 emmanuel_erc joins (~user@2603-7000-9600-01c9-c589-d024-9ed2-1840.res6.spectrum.com)
2021-02-27 10:09:15 <ij> anyway, I converted the frog to grayscale with specifying that only with types :D
2021-02-27 10:09:37 <Guest34200> so if I were to use toLists, how would I specify the colorspace and the precision? from the example:  img == fromLists (toLists img) it only provides the image
2021-02-27 10:10:03 <ij> first read an image with the concrete desired types and toLists will output those
2021-02-27 10:10:49 <ij> see the readImageExact I posted above
2021-02-27 10:11:25 <Guest34200> oh so you need to read the image first, and toLists will take whatever colorspace and precision the image was read with and just put it into a list of lists?
2021-02-27 10:11:46 <ij> unsurprisingly, yes :)
2021-02-27 10:12:05 × xff0x quits (~xff0x@2001:1a81:5311:f400:9530:24a1:6c01:a8d6) (Ping timeout: 272 seconds)
2021-02-27 10:12:45 xff0x joins (~xff0x@2001:1a81:5311:f400:99b1:a451:602d:e252)
2021-02-27 10:13:14 <Guest34200> ah ok i'll try that
2021-02-27 10:14:06 <Guest34200> ooh how does it know how many lists to have nested within the outer list? does it read the dimensions of the image?
2021-02-27 10:14:45 <ij> it would be a weird image library if it didn't read the dimensions
2021-02-27 10:14:56 <Guest34200> true true
2021-02-27 10:14:56 × emmanuel_erc quits (~user@2603-7000-9600-01c9-c589-d024-9ed2-1840.res6.spectrum.com) (Read error: Connection reset by peer)
2021-02-27 10:15:03 <ij> "VS - Vector Storable representation."
2021-02-27 10:15:28 <Guest34200> oh right
2021-02-27 10:15:40 <Guest34200> so If I were to use, say VU
2021-02-27 10:15:43 emmanuel_erc joins (~user@2603-7000-9600-01c9-c589-d024-9ed2-1840.res6.spectrum.com)
2021-02-27 10:15:49 <Guest34200> i would not be able to do this? because that information isn't stored?
2021-02-27 10:16:10 <ij> no, both should be fine
2021-02-27 10:16:18 <ij> it's about vector internals, it shouldn't matter
2021-02-27 10:17:12 <Guest34200> oh
2021-02-27 10:17:14 <ij> (it's Vector.Storable vs Vector.Unboxed)
2021-02-27 10:19:47 <Guest34200> Expected kind `* -> * -> *', but `Image I.VS' has kind `*'
2021-02-27 10:20:00 <Guest34200> does this mean more inputs were expected?
2021-02-27 10:20:16 <Guest34200> sorry I'm still learning about type signatures so this is all very unfamiliar to me
2021-02-27 10:20:44 nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3)
2021-02-27 10:21:45 × emmanuel_erc quits (~user@2603-7000-9600-01c9-c589-d024-9ed2-1840.res6.spectrum.com) (Read error: Connection reset by peer)
2021-02-27 10:22:05 × Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer)
2021-02-27 10:22:26 emmanuel_erc joins (~user@2603-7000-9600-01c9-c589-d024-9ed2-1840.res6.spectrum.com)
2021-02-27 10:23:38 <ij> image should have 3 type arguments like readImageExact example above, right?
2021-02-27 10:26:26 × nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Ping timeout: 264 seconds)
2021-02-27 10:27:22 × hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-xgujbhvivyzipvnb) (Quit: Connection closed for inactivity)
2021-02-27 10:28:07 <Guest34200> yeah
2021-02-27 10:28:23 <Guest34200>   procImg <- I.readImageY I.VS img
2021-02-27 10:28:23 <Guest34200>     let newImg = toLists
2021-02-27 10:28:24 <Guest34200>     return newImg
2021-02-27 10:28:42 × emmanuel_erc quits (~user@2603-7000-9600-01c9-c589-d024-9ed2-1840.res6.spectrum.com) (Read error: Connection reset by peer)
2021-02-27 10:29:11 emmanuel_erc joins (~user@2603-7000-9600-01c9-c589-d024-9ed2-1840.res6.spectrum.com)
2021-02-27 10:29:12 <Guest34200> img should be a file path
2021-02-27 10:29:53 <Guest34200>  procImg <- I.readImageY I.VS "test.png"
2021-02-27 10:30:38 LKoen joins (~LKoen@185.61.176.203)
2021-02-27 10:34:58 × da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:c8ae:4c2c:c3c0:6062:2fc9) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-02-27 10:35:24 × emmanuel_erc quits (~user@2603-7000-9600-01c9-c589-d024-9ed2-1840.res6.spectrum.com) (Read error: Connection reset by peer)
2021-02-27 10:35:56 emmanuel_erc joins (~user@2603-7000-9600-01c9-c589-d024-9ed2-1840.res6.spectrum.com)
2021-02-27 10:36:55 fendor joins (~fendor@91.141.0.74.wireless.dyn.drei.com)
2021-02-27 10:37:23 × vicfred quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving)
2021-02-27 10:40:07 _noblegas joins (uid91066@gateway/web/irccloud.com/x-hqwlvmypxcgqlrdh)
2021-02-27 10:42:07 × emmanuel_erc quits (~user@2603-7000-9600-01c9-c589-d024-9ed2-1840.res6.spectrum.com) (Read error: Connection reset by peer)
2021-02-27 10:42:44 emmanuel_erc joins (~user@2603-7000-9600-01c9-c589-d024-9ed2-1840.res6.spectrum.com)
2021-02-27 10:43:53 <Guest34200> it seems toLists is formatted in this way: [[<Luma:(0.9372549019607843)>,<Luma:(0.8549019607843137)>]], is there a way to get rid of the name of the precision?
2021-02-27 10:45:04 × z0k quits (~user@115-186-141-91.nayatel.pk) (Read error: Connection reset by peer)
2021-02-27 10:45:55 z0k joins (~user@115-186-141-91.nayatel.pk)
2021-02-27 10:48:49 × emmanuel_erc quits (~user@2603-7000-9600-01c9-c589-d024-9ed2-1840.res6.spectrum.com) (Read error: Connection reset by peer)
2021-02-27 10:49:14 × Mrbuck quits (~Mrbuck@gateway/tor-sasl/mrbuck) (Ping timeout: 268 seconds)
2021-02-27 10:49:54 m0rphism1 joins (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de)

All times are in UTC.