Current Server Time: 23:32 (Central Europe)

#apertus IRC Channel Logs

2020/03/01

Timezone: UTC


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