aaaalso
ich kann jetzt eine .exe erstellen. die funktioniert auch, das ergebnis ist allerdings ein bisschen merkwürdig:
unsigned char picture[]={
4294967211,4294967211,4294967211,4294967211,429496 7211,4294967209,41,41,
41,40,40,40,40,40,40,40,
4294967210,4294967210,42,42,42,42,42,32,
4294967168,0,0,0,0,0,0,0,
87,87,87,83,83,81,81,81,
85,85,85,85,85,85,85,85,
85,85,85,85,85,84,84,64,
0,0,0,0,0,0,0,0,
4294967211,4294967211,4294967211,4294967210,429496 7202,4294967200,32,32,
43,43,42,42,42,42,42,42,
4294967210,4294967210,4294967210,4294967210,429496 7210,4294967210,4294967208,4294967200,
32,0,0,0,0,0,0,0,
87,87,87,87,87,83,83,83,
83,81,81,81,81,81,81,81,
85,85,85,85,84,84,84,64,
0,0,0,0,0,0,0,0,
4294967214,4294967210,4294967202,4294967200,429496 7200,4294967200,4294967200,0,
32,0,0,0,0,0,0,0,
2,2,2,2,2,2,2,0,
4294967208,32,32,32,0,0,0,0,
93,93,81,81,65,64,64,0,
0,0,0,0,0,0,0,0,
1,0,0,0,0,0,0,0,
80,80,0,0,0,0,0,0,
4294967226,4294967210,4294967210,4294967208,429496 7208,4294967168,0,0,
4294967168,0,0,0,0,0,0,0,
2,2,2,2,2,2,2,2,
4294967200,32,32,0,0,0,0,0,
93,85,69,65,65,65,64,0,
64,0,0,0,0,0,0,0,
5,5,4,4,4,4,4,0,
81,64,64,64,0,0,0,0,
4294967250,4294967250,4294967250,4294967186,429496 7186,4294967186,4294967186,4294967184,
4294967184,16,16,16,16,16,0,0,
4294967170,4294967170,4294967170,4294967170,429496 7170,4294967170,4294967170,4294967170,
4294967208,4294967208,4294967208,4294967208,429496 7200,4294967200,4294967200,4294967200,
4294967277,4294967269,101,101,101,101,101,96,
32,32,32,0,0,0,0,0,
0,0,0,0,0,0,0,0,
85,80,80,80,80,80,80,80,
4294967250,4294967250,4294967250,4294967250,429496 7250,4294967170,4294967168,4294967168,
4294967168,0,0,0,0,0,0,0,
4294967168,4294967168,4294967168,4294967168,429496 7168,4294967168,4294967168,4294967168,
4294967208,4294967200,4294967200,4294967200,429496 7200,4294967200,4294967200,4294967200,
4294967205,4294967205,4294967205,37,37,37,37,32,
32,32,32,32,32,32,0,0,
4,4,4,4,4,4,4,4,
81,80,80,80,64,64,64,64,
4294967231,4294967231,4294967211,4294967210,429496 7210,4294967210,4294967210,4294967210,
4294967210,4294967210,4294967210,4294967208,429496 7208,4294967200,4294967200,4294967200,
4294967170,4294967170,4294967170,2,2,2,2,2,
4294967178,4294967170,2,2,2,2,2,2,
127,127,95,85,85,85,85,85,
85,85,84,80,80,80,64,64,
64,0,0,0,0,0,0,0,
85,21,21,5,5,5,5,5,
4294967231,4294967231,4294967227,4294967210,429496 7210,4294967210,4294967210,4294967210,
4294967210,4294967210,4294967210,4294967208,429496 7200,4294967200,4294967200,4294967168,
4294967168,4294967168,0,0,0,0,0,0,
42,42,10,10,10,10,10,10,
127,127,87,85,85,85,85,85,
85,84,84,80,80,64,64,64,
5,5,5,5,5,5,5,5};
eigt dürfen nur werte zwischen 0 und 255 auftreten, 4294967208 sprengt da ganz eindeutig den rahmen.
wie muss ich diese zeilen umschreiben damit sie auf mein 64x128 glcd passen ?
file2=malloc(504);
memset(file2,0,504);
for(x=0;x<84;x++)
{
for(y=0;y<48;y++)
{
if(!(*(file1+y*12+x/8 )>>(7-(x%8 )))&1==1)
{
*(file2+(5-y/8 )*84+x)|=1<<(7-(y%8 ));
}
}
}
also 84==>128 und 48==>64, denke ich mir, und der rest ???
ja das hab ich schon gemacht. aber egal wie es ist, das ergebnis ist nicht brauchbar. ich hab einfach mal ein komplett schwarzes bild 84x48pixel konvertieren lassen. ergebnis:
unsigned char picture[]={
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,251,123,123,123,
123,123,123,123,255,127,127,127,
127,127,127,127,255,127,63,63,
63,63,63,31,255,255,255,255,
255,255,127,127,255,255,255,255,
255,255,255,223,255,255,255,255,
255,255,255,255,255,191,191,191,
191,191,191,191,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,
255,255,255,255,247,215,23,23};
und weiß:
unsigned char picture[]={
0,0,0,0,0,0,0,0,
255,255,255,255,255,255,255,255,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,255,255,255,255,
255,255,255,255,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
255,255,255,255,255,255,255,255,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,255,255,255,255,
255,255,255,255,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
255,255,255,255,255,255,255,255,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,
0,0,0,0,248,120,120,120,
120,120,120,120,255,127,127,127,
127,127,127,127,248,120,56,56,
56,56,56,24,248,248,248,248,
248,248,120,120,248,248,248,248,
248,248,248,216,248,248,248,248,
248,248,248,248,248,184,184,184,
184,184,184,184,248,248,248,248,
248,248,248,248,248,248,248,248,
248,248,248,248,248,248,248,248,
248,248,248,248,240,208,16,16};
da kann was nicht stimmen.
file2=malloc(504);
memset(file2,0,504);
for(x=0;x<84;x++)
{
for(y=0;y<48;y++)
{
if(!(*(file1+y*12+x/8)>>(7-(x%8)))&1==1)
{
*(file2+(5-y/8)*84+x)|=1<<(7-(y%8));
}
}
}
diesen code abschnitt habe ich so abgeändert:
file2=malloc(1024);
memset(file2,0,1024);
for(x=0;x<128;x++)
{
for(y=0;y<64;y++)
{
if(!(*(file1+y*12+x/8)>>(7-(x%8)))&1==1)
{
*(file2+(5-y/8)*128+x)|=1<<(7-(y%8));
}
}
}
ist das richtig so ? naja das programm lässt sich so zwar compilieren, aber windoof hängt sich immer auf wenn ich das programm dann starte.
aber wenn ich nur 84x48 bilder konvertiere mit dem alten code, funktioniert es ja auch nicht, siehe oben
Powered by vBulletin® Version 4.2.5 Copyright ©2024 Adduco Digital e.K. und vBulletin Solutions, Inc. Alle Rechte vorbehalten.