gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fixing pictures from .xpm files


From: Pavel Machek
Subject: Fixing pictures from .xpm files
Date: Wed, 29 May 2002 12:25:28 +0200
User-agent: Mutt/1.3.28i

Hi!

This fixes pictures being sent from .xpm file. Commited.

                                                                Pavel

Index: common/gsm-filetypes.c
===================================================================
RCS file: /cvsroot/gnokii/gnokii/common/gsm-filetypes.c,v
retrieving revision 1.29
diff -u -u -r1.29 gsm-filetypes.c
--- common/gsm-filetypes.c      23 May 2002 09:33:12 -0000      1.29
+++ common/gsm-filetypes.c      29 May 2002 10:17:31 -0000
@@ -577,17 +577,17 @@
        /* All xpms are loaded as startup logos - but can be resized later */
 
        switch (bitmap->type) {
-       case GSM_EMSPicture:
-               bitmap->height = image.height;
-               bitmap->width = image.width;
-               bitmap->size = ((bitmap->width + 7) / 8) * bitmap->height;
+       case GSM_PictureMessage:
+               bitmap->height = 72;
+               bitmap->width = 48;
                break;
+       case GSM_EMSPicture:
        default:
                bitmap->height = image.height;
                bitmap->width = image.width;
-               bitmap->size = ((bitmap->height / 8) + (bitmap->height % 8 > 
0)) * bitmap->width;
                break;
        }
+       bitmap->size = ((bitmap->width + 7) / 8) * bitmap->height;
 
        if (bitmap->size > GSM_MAX_BITMAP_SIZE) {
                fprintf(stdout, "Bitmap too large\n");
Index: testsuite/out.14.oplogo-xpm
===================================================================
RCS file: /cvsroot/gnokii/gnokii/testsuite/out.14.oplogo-xpm,v
retrieving revision 1.3
diff -u -u -r1.3 out.14.oplogo-xpm
--- testsuite/out.14.oplogo-xpm 21 May 2002 09:05:54 -0000      1.3
+++ testsuite/out.14.oplogo-xpm 29 May 2002 10:18:24 -0000
@@ -1,4 +1,4 @@
 Sending operator logo.
-AT+???=171
-0051000A00800021436500F5009E0605041582000002F31000480E0107800000000001F0001FE00000000007FC003FF0000000000FFE007FF8000000000CCE007FC0000000000D5600FF00000000000EEE00FC06318C6318CFFE63FC06318C6318CFFE63FF00000000000FFE007FC0000000000EAE007FF8000000000D56003FF0000000000FFE001FE0000000000CE600078000000000084200000000000000000000000000000000000000
+AT+???=153
+0051000A00800021436500F5008C0605041582000002F31000480E010000F800000061B0000001FC00000061B0000001AC0000006000000000F80E3E1C6DB0000001741F3F366DB00000032631B36379B00000030631B3637DB0000006073FB3366DB0000006071FB31C65B000000607018000000000000E0F018000000000001F0F8F8000000000001F1F078000000000000FFE000000000000
 Send succeeded!
Index: testsuite/test.12.picture
===================================================================
RCS file: /cvsroot/gnokii/gnokii/testsuite/test.12.picture,v
retrieving revision 1.2
diff -u -u -r1.2 test.12.picture
--- testsuite/test.12.picture   23 May 2002 09:18:25 -0000      1.2
+++ testsuite/test.12.picture   29 May 2002 10:18:24 -0000
@@ -1,4 +1,4 @@
 #
 # Try to send a picture SMS.
 #
-$GNOKII --sendlogo picture 0604343103 ../Docs/gnokii.nol "Ahoj, tohle je mala 
zprava na testovani telefonu"
+$GNOKII --sendlogo picture 0604343103 ../Docs/gnokiiop.xpm "Ahoj, tohle je 
mala zprava na testovani telefonu"
Index: testsuite/test.14.oplogo-xpm
===================================================================
RCS file: /cvsroot/gnokii/gnokii/testsuite/test.14.oplogo-xpm,v
retrieving revision 1.2
diff -u -u -r1.2 test.14.oplogo-xpm
--- testsuite/test.14.oplogo-xpm        20 May 2002 19:56:30 -0000      1.2
+++ testsuite/test.14.oplogo-xpm        29 May 2002 10:18:24 -0000
@@ -1,4 +1 @@
-#
-# Note: I do not know if result would actually work. It looks slightly big to 
me.
-#
-$GNOKII --sendlogo op 0800123456 ../Docs/pacman.xpm "203 01"
\ No newline at end of file
+$GNOKII --sendlogo op 0800123456 ../Docs/gnokiiop.xpm "203 01"
\ No newline at end of file

-- 
(about SSSCA) "I don't say this lightly.  However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa



reply via email to

[Prev in Thread] Current Thread [Next in Thread]