Post Reply 
How to compile pixels?
12-03-2019, 04:34 PM
Post: #1
How to compile pixels?
In the house 49g+/48gii aur have such a program:GROB number,then plot it.I want to know how to get that string of hexadecimal digits.


Attached File(s) Thumbnail(s)
           
Find all posts by this user
Quote this message in a reply
12-03-2019, 08:45 PM
Post: #2
RE: How to compile pixels?
The graphic example:
Code:
 OOOOO
O     O
O   O O
O     OO
O     O
 OOOOO
   O
  OOO   O
 O O O O
O  O  O
O  O
  O O
 O   O
O     O O
 O     O

The graphic is coded line per line. The graphic has a width of 9 we habe to spend 2 bytes (a multiple of 8) per line.

Let's split the graphic into nibbles, bit 0 first. The headline shows the value of each bit.

Code:
1248|1248|1248|1248

 OOO|OO  |    |
O   |  O |    |
O   |O O |    |
O   |  OO|    |
O   |  O |    |
 OOO|OO  |    |
   O|    |    |
  OO|O   |O   |
 O O| O O|    |
O  O|  O |    |
O  O|    |    |
  O |O   |    |
 O  | O  |    |
O   |  O |O   |
 O  |   O|    |

So looking at first Line replacing the blank with 0 the 'O' with 1

Line1, Nibble 0 = 0111 -> reverse -> 1110 -> E
Line1, Nibble 1 = 1100 -> reverse -> 0011 -> 3
Line1, Nibble 2 = 0000 -> reverse -> 0000 -> 0
Line1, Nibble 3 = 0000 -> reverse -> 0000 -> 0

Line2, Nibble 0 = 1000 -> reverse -> 0001 -> 1
Line2, Nibble 1 = 0010 -> reverse -> 0100 -> 4
Line2, Nibble 2 = 0000 -> reverse -> 0000 -> 0
Line2, Nibble 3 = 0000 -> reverse -> 0000 -> 0

so doing the next lines until end.

GROB width height

E300
1400
1500
1C00
1400
E300
8000
C110
AA00
9400
9000
4100
2200
1410
2800

Written in the example:

GROB 9 15 E300
140015001C001400E300
8000C110AA0094009000
4100220014102800
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)