Current Server Time: 17:01 (Central Europe)

#apertus IRC Channel Logs

2020/03/01

Timezone: UTC


01:01
aombk3
left the channel
01:04
aombk
joined the channel
06:29
BAndiT1983|away
changed nick to: BAndiT1983
07:24
Bertl_oO
off to bed now ... have a good one everyone!
07:24
Bertl_oO
changed nick to: Bertl_zZ
14:24
Bertl_zZ
changed nick to: Bertl
14:25
Bertl
morning folks!
14:55
metal_dent[m]
morning!
15:33
BAndiT1983
changed nick to: BAndiT1983|away
15:38
BAndiT1983|away
changed nick to: BAndiT1983
15:48
metal_dent[m]
hi, i finished my program of converting every 8 binary bits into hex numbers but my hex answer is being stored in string/char array and when i convert it into uint8_t it becomes its decimal equivalent
15:55
BAndiT1983
uint8_t array would be more portable
15:58
metal_dent[m]
yes i've taken uint8_t array but string hex (which i converted from bin) can't be directly stored in unit8_t so i've to first convert it into int then uint8_t so ultimately it becomes decimal not hex
15:58
metal_dent[m]
or maybe there's a direct method to store string/char value to uint8_t which i don't know ð
15:58
Bertl
unsigned char is always identical to uint8_t on any platform in C and C++
16:07
BAndiT1983
metal_dent[m]: can you pastebin something, to get the picture of what is the current state?
16:08
metal_dent[m]
> metal_dent: can you pastebin something, to get the picture of what is the current state?
16:08
metal_dent[m]
the c++ code?
16:08
BAndiT1983
yep, of the image array
16:13
metal_dent[m]
This is the hex array : https://pastebin.com/raw/gYy3teha
16:15
BAndiT1983
looks legit at first sight, have you also the c++ conversion already?
16:18
metal_dent[m]
you mean my c++ code? I have that but it's messy right now ð, i'll clean it up first
16:19
BAndiT1983
i mean the converted array to c++ header
16:21
metal_dent[m]
no i haven't done that yet, i'll do that soon
16:22
BAndiT1983
ok
16:23
metal_dent[m]
but there i was having the problem of converting to uint8_t
16:24
BAndiT1983
what was the matter?
16:25
metal_dent[m]
i mean is there a direct way of converting a string to uint8_t (i checked out one way is to convert to int then uint8_t) ?
16:32
BAndiT1983
metal_dent[m]: you need to convert the data, but also to concatenate 8 "bits" in a byte
16:33
Bertl
the pasted data are hex bytes, i.e. 8 bit
16:33
metal_dent[m]
yes i've done that all (8 bits bin into hex number)
16:35
metal_dent[m]
but my final hex value is a string which m storing in uint8_t array where the problem is
16:35
metal_dent[m]
basically i've written a function which accepts the 8 bit binary number and returns equivalent hex in a string
16:36
metal_dent[m]
* but my final hex value is a string which m storing in uint8_t array where the problem is.
16:36
metal_dent[m]
Basically i've written a function which accepts the 8 bit binary number and returns equivalent hex in a string
16:37
BAndiT1983
why in a stirng?
16:40
metal_dent[m]
umm.. because hex has characters also so it's easy to store in a string (or char array)
16:42
BAndiT1983
no need to store in the string
16:42
BAndiT1983
you can just iterate through every element, convert from 0 or 1 to equivalent binary and shift it into the byte
16:43
BAndiT1983
changed nick to: BAndiT1983|away
16:44
metal_dent[m]
oh okay, thanks!
17:36
BAndiT1983|away
changed nick to: BAndiT1983
18:55
niemand
joined the channel
18:55
niemand
left the channel
18:55
niemand
joined the channel
19:50
BAndiT1983
metal_dent[m]: played around and stumbled upon XBM format, will pastebin it
19:52
BAndiT1983
https://pastebin.com/raw/ekgVYrLB
19:52
BAndiT1983
command -> magick apertus\ Logo\ Show_indexed.png -monochrome -negate -threshold 50% apertus_logo.xbm
19:52
BAndiT1983
magick is just another name for convert in newer IM
19:53
metal_dent[m]
> https://pastebin.com/raw/ekgVYrLB
19:53
metal_dent[m]
wow it directly converts into the desired format!!
19:53
Bertl
IM FTW \o/
19:54
BAndiT1983
fanboi :P
19:54
BAndiT1983
this format only requires header guards, to prevent multiple inclusion errors from compiler
19:55
BAndiT1983
it was not obvious what the format is, was only searching for mono formats on this page -> http://imagemagick.sourceforge.net/http/www/formats.html
19:56
Bertl
the X BitMap format was designed for X11 in 1989
19:56
Bertl
no, actually XPM replaced XBM already in 1989
19:58
BAndiT1983
xbm is fitting the usage case, xpm has many versions, but they are overkill
19:59
BAndiT1983
seems like XPM and PBM are related a bit
19:59
Bertl
PBM has basically replaced XPM and XBM today ...
20:00
Bertl
(doesn't mean that it can't be useful :)
20:01
BAndiT1983
PBM is great for quick output of data, i think we used it for OC tests with Claudio, but as ascii format it tends to grow bigger and i prefer slim binary formats, which don't need parsing
20:02
Bertl
like the binary PBM versions?
20:02
BAndiT1983
looking on google, but haven't found yet
20:02
Bertl
P1,P2,P3 is ASCII, P4,P5,P6 is the same as binary
20:03
Bertl
P1/P4 = black/white
20:03
BAndiT1983
ah, now i remember
20:03
Bertl
P2/P5 = grayscale
20:03
Bertl
P3/P6 = color
20:04
BAndiT1983
okay metal_dent[m], now you can just focus on drawing the image
20:04
metal_dent[m]
BAndiT1983: yes :)
20:04
BAndiT1983
bit shifting can cause a bit of trouble, depending on how the data is stored
20:11
BAndiT1983
ok, ok, Bertl, IM wins again
20:14
BAndiT1983
off for today, work awaits tomorrow
20:14
BAndiT1983
changed nick to: BAndiT1983|away
20:18
Bertl
off for now as well .. probably back later ...
20:18
Bertl
changed nick to: bertl_oO
20:18
bertl_oO
changed nick to: Bertl_oO
21:02
niemand
left the channel
22:43
intracube
left the channel
22:46
intracube
joined the channel