Merge pull request #1558 from siddacious/bmp_bitdepths

initial support for additional bitdepths in OnDiskBitmap
This commit is contained in:
Dan Halbert 2019-02-24 13:21:54 -05:00 committed by GitHub
commit e3606461c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 207 additions and 65 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-02-22 15:26-0800\n" "POT-Creation-Date: 2019-02-23 10:51-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -756,6 +756,11 @@ msgstr ""
msgid "Odd parity is not supported" msgid "Odd parity is not supported"
msgstr "Parity ganjil tidak didukung" msgstr "Parity ganjil tidak didukung"
#, c-format
msgid ""
"Only 16bpp RGB 565 supported for bitfield compressed BMPs; R:%x G:%x B:%x"
msgstr ""
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "Hanya 8 atau 16 bit mono dengan " msgstr "Hanya 8 atau 16 bit mono dengan "
@ -770,7 +775,9 @@ msgid "Only slices with step=1 (aka None) are supported"
msgstr "" msgstr ""
#, c-format #, c-format
msgid "Only true color (24 bpp or higher) BMP supported %x" msgid ""
"Only true color (24 bpp or higher), 16bpp 565 and 555, and 8bpp grayscale "
"BMP supported %d"
msgstr "" msgstr ""
msgid "Only tx supported on UART1 (GPIO2)." msgid "Only tx supported on UART1 (GPIO2)."

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-02-22 15:26-0800\n" "POT-Creation-Date: 2019-02-23 19:57-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -730,6 +730,11 @@ msgstr ""
msgid "Odd parity is not supported" msgid "Odd parity is not supported"
msgstr "" msgstr ""
#, c-format
msgid ""
"Only 16bpp RGB 565 supported for bitfield compressed BMPs; R:%x G:%x B:%x"
msgstr ""
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "" msgstr ""
@ -744,7 +749,9 @@ msgid "Only slices with step=1 (aka None) are supported"
msgstr "" msgstr ""
#, c-format #, c-format
msgid "Only true color (24 bpp or higher) BMP supported %x" msgid ""
"Only true color (24 bpp or higher), 16bpp 565 and 555, and 8bpp grayscale "
"BMP supported %d"
msgstr "" msgstr ""
msgid "Only tx supported on UART1 (GPIO2)." msgid "Only tx supported on UART1 (GPIO2)."

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-02-22 15:26-0800\n" "POT-Creation-Date: 2019-02-23 19:57-0800\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: Pascal Deneaux\n" "Last-Translator: Pascal Deneaux\n"
"Language-Team: Sebastian Plamauer, Pascal Deneaux\n" "Language-Team: Sebastian Plamauer, Pascal Deneaux\n"
@ -394,7 +394,8 @@ msgid "Display rotation must be in 90 degree increments"
msgstr "Die Rotation der Anzeige muss in 90-Grad-Schritten erfolgen" msgstr "Die Rotation der Anzeige muss in 90-Grad-Schritten erfolgen"
msgid "Don't know how to pass object to native function" msgid "Don't know how to pass object to native function"
msgstr "Ich weiß nicht, wie man das Objekt an die native Funktion übergeben kann" msgstr ""
"Ich weiß nicht, wie man das Objekt an die native Funktion übergeben kann"
msgid "Drive mode not used when direction is input." msgid "Drive mode not used when direction is input."
msgstr "Drive mode wird nicht verwendet, wenn die Richtung input ist." msgstr "Drive mode wird nicht verwendet, wenn die Richtung input ist."
@ -664,20 +665,25 @@ msgid "Maximum x value when mirrored is %d"
msgstr "Maximaler x-Wert beim Spiegeln ist %d" msgstr "Maximaler x-Wert beim Spiegeln ist %d"
msgid "MicroPython NLR jump failed. Likely memory corruption.\n" msgid "MicroPython NLR jump failed. Likely memory corruption.\n"
msgstr "MicroPython-NLR-Sprung ist fehlgeschlagen. Wahrscheinlich Speicherbeschädigung.\n" msgstr ""
"MicroPython-NLR-Sprung ist fehlgeschlagen. Wahrscheinlich "
"Speicherbeschädigung.\n"
msgid "MicroPython fatal error.\n" msgid "MicroPython fatal error.\n"
msgstr "Schwerwiegender MicroPython-Fehler\n" msgstr "Schwerwiegender MicroPython-Fehler\n"
msgid "Microphone startup delay must be in range 0.0 to 1.0" msgid "Microphone startup delay must be in range 0.0 to 1.0"
msgstr "Die Startverzögerung des Mikrofons muss im Bereich von 0,0 bis 1,0 liegen" msgstr ""
"Die Startverzögerung des Mikrofons muss im Bereich von 0,0 bis 1,0 liegen"
msgid "Minimum PWM frequency is 1hz." msgid "Minimum PWM frequency is 1hz."
msgstr "Minimale PWM Frequenz ist %dHz" msgstr "Minimale PWM Frequenz ist %dHz"
#, c-format #, c-format
msgid "Multiple PWM frequencies not supported. PWM already set to %dhz." msgid "Multiple PWM frequencies not supported. PWM already set to %dhz."
msgstr "Mehrere PWM Frequenzen werden nicht unterstützt. PWM wurde bereits auf %dHz gesetzt." msgstr ""
"Mehrere PWM Frequenzen werden nicht unterstützt. PWM wurde bereits auf %dHz "
"gesetzt."
msgid "Must be a Group subclass." msgid "Must be a Group subclass."
msgstr "" msgstr ""
@ -742,6 +748,11 @@ msgstr ""
msgid "Odd parity is not supported" msgid "Odd parity is not supported"
msgstr "Eine ungerade Parität wird nicht unterstützt" msgstr "Eine ungerade Parität wird nicht unterstützt"
#, c-format
msgid ""
"Only 16bpp RGB 565 supported for bitfield compressed BMPs; R:%x G:%x B:%x"
msgstr ""
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "Nur 8 oder 16 bit mono mit " msgstr "Nur 8 oder 16 bit mono mit "
@ -750,14 +761,17 @@ msgid "Only Windows format, uncompressed BMP supported %d"
msgstr "Nur unkomprimiertes Windows-Format (BMP) unterstützt %d" msgstr "Nur unkomprimiertes Windows-Format (BMP) unterstützt %d"
msgid "Only bit maps of 8 bit color or less are supported" msgid "Only bit maps of 8 bit color or less are supported"
msgstr "Es werden nur Bitmaps mit einer Farbtiefe von 8 Bit oder weniger unterstützt" msgstr ""
"Es werden nur Bitmaps mit einer Farbtiefe von 8 Bit oder weniger unterstützt"
msgid "Only slices with step=1 (aka None) are supported" msgid "Only slices with step=1 (aka None) are supported"
msgstr "" msgstr ""
#, c-format #, c-format
msgid "Only true color (24 bpp or higher) BMP supported %x" msgid ""
msgstr "Es werden nur true color (24 bpp oder höher) BMP unterstützt %x" "Only true color (24 bpp or higher), 16bpp 565 and 555, and 8bpp grayscale "
"BMP supported %d"
msgstr ""
msgid "Only tx supported on UART1 (GPIO2)." msgid "Only tx supported on UART1 (GPIO2)."
msgstr "UART1 (GPIO2) unterstützt nur tx" msgstr "UART1 (GPIO2) unterstützt nur tx"
@ -767,13 +781,11 @@ msgstr "Oversample muss ein Vielfaches von 8 sein."
msgid "" msgid ""
"PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)"
msgstr "" msgstr "PWM duty_cycle muss zwischen 0 und 65535 (16 Bit Auflösung) liegen"
"PWM duty_cycle muss zwischen 0 und 65535 (16 Bit Auflösung) liegen"
msgid "" msgid ""
"PWM frequency not writable when variable_frequency is False on construction." "PWM frequency not writable when variable_frequency is False on construction."
msgstr "" msgstr "Die PWM-Frequenz ist nicht schreibbar wenn variable_Frequenz = False."
"Die PWM-Frequenz ist nicht schreibbar wenn variable_Frequenz = False."
#, c-format #, c-format
msgid "PWM not supported on pin %d" msgid "PWM not supported on pin %d"
@ -801,7 +813,9 @@ msgid "Plus any modules on the filesystem\n"
msgstr "und alle Module im Dateisystem \n" msgstr "und alle Module im Dateisystem \n"
msgid "Press any key to enter the REPL. Use CTRL-D to reload." msgid "Press any key to enter the REPL. Use CTRL-D to reload."
msgstr "Drücke eine Taste um dich mit der REPL zu verbinden. Drücke Strg-D zum neu laden" msgstr ""
"Drücke eine Taste um dich mit der REPL zu verbinden. Drücke Strg-D zum neu "
"laden"
msgid "Pull not used when direction is output." msgid "Pull not used when direction is output."
msgstr "Pull wird nicht verwendet, wenn die Richtung output ist." msgstr "Pull wird nicht verwendet, wenn die Richtung output ist."
@ -984,7 +998,9 @@ msgstr "Unbekannter Typ"
#, c-format #, c-format
msgid "Unmatched number of items on RHS (expected %d, got %d)." msgid "Unmatched number of items on RHS (expected %d, got %d)."
msgstr "Nicht übereinstimmende Anzahl von Elementen auf der rechten Seite (erwartet %d, %d erhalten)." msgstr ""
"Nicht übereinstimmende Anzahl von Elementen auf der rechten Seite (erwartet "
"%d, %d erhalten)."
msgid "Unsupported baudrate" msgid "Unsupported baudrate"
msgstr "Baudrate wird nicht unterstützt" msgstr "Baudrate wird nicht unterstützt"
@ -1002,7 +1018,8 @@ msgid "Unsupported pull value."
msgstr "Nicht unterstützter Pull-Wert" msgstr "Nicht unterstützter Pull-Wert"
msgid "Use esptool to erase flash and re-upload Python instead" msgid "Use esptool to erase flash and re-upload Python instead"
msgstr "Benutze das esptool um den flash zu löschen und Python erneut hochzuladen" msgstr ""
"Benutze das esptool um den flash zu löschen und Python erneut hochzuladen"
msgid "Viper functions don't currently support more than 4 arguments" msgid "Viper functions don't currently support more than 4 arguments"
msgstr "Viper-Funktionen unterstützen derzeit nicht mehr als 4 Argumente" msgstr "Viper-Funktionen unterstützen derzeit nicht mehr als 4 Argumente"
@ -1011,7 +1028,8 @@ msgid "Voice index too high"
msgstr "Voice index zu hoch" msgstr "Voice index zu hoch"
msgid "WARNING: Your code filename has two extensions\n" msgid "WARNING: Your code filename has two extensions\n"
msgstr "WARNUNG: Der Dateiname deines Programms hat zwei Dateityperweiterungen\n" msgstr ""
"WARNUNG: Der Dateiname deines Programms hat zwei Dateityperweiterungen\n"
#, c-format #, c-format
msgid "" msgid ""
@ -1474,7 +1492,8 @@ msgstr "Funktion vermisst benötigtes Argumente ohne Keyword #%d"
#, c-format #, c-format
msgid "function takes %d positional arguments but %d were given" msgid "function takes %d positional arguments but %d were given"
msgstr "Funktion nimmt %d Argumente ohne Keyword an, aber es wurden %d angegeben" msgstr ""
"Funktion nimmt %d Argumente ohne Keyword an, aber es wurden %d angegeben"
msgid "function takes exactly 9 arguments" msgid "function takes exactly 9 arguments"
msgstr "Funktion benötigt genau 9 Argumente" msgstr "Funktion benötigt genau 9 Argumente"
@ -1592,10 +1611,14 @@ msgid "issubclass() arg 2 must be a class or a tuple of classes"
msgstr "issubclass() arg 2 muss eine Klasse oder ein Tupel von Klassen sein" msgstr "issubclass() arg 2 muss eine Klasse oder ein Tupel von Klassen sein"
msgid "join expects a list of str/bytes objects consistent with self object" msgid "join expects a list of str/bytes objects consistent with self object"
msgstr "join erwartet eine Liste von str/bytes-Objekten, die mit dem self-Objekt übereinstimmen" msgstr ""
"join erwartet eine Liste von str/bytes-Objekten, die mit dem self-Objekt "
"übereinstimmen"
msgid "keyword argument(s) not yet implemented - use normal args instead" msgid "keyword argument(s) not yet implemented - use normal args instead"
msgstr "Keyword-Argument(e) noch nicht implementiert - verwenden Sie stattdessen normale Argumente" msgstr ""
"Keyword-Argument(e) noch nicht implementiert - verwenden Sie stattdessen "
"normale Argumente"
msgid "keywords must be strings" msgid "keywords must be strings"
msgstr "Schlüsselwörter müssen Zeichenfolgen sein" msgstr "Schlüsselwörter müssen Zeichenfolgen sein"
@ -1622,7 +1645,9 @@ msgid "local '%q' used before type known"
msgstr "Lokales '%q' verwendet bevor Typ bekannt" msgstr "Lokales '%q' verwendet bevor Typ bekannt"
msgid "local variable referenced before assignment" msgid "local variable referenced before assignment"
msgstr "Es wurde versucht auf eine Variable zuzugreifen, die es (noch) nicht gibt. Variablen immer zuerst Zuweisen!" msgstr ""
"Es wurde versucht auf eine Variable zuzugreifen, die es (noch) nicht gibt. "
"Variablen immer zuerst Zuweisen!"
msgid "long int not supported in this build" msgid "long int not supported in this build"
msgstr "long int wird in diesem Build nicht unterstützt" msgstr "long int wird in diesem Build nicht unterstützt"
@ -1642,7 +1667,8 @@ msgstr "Speicherzuordnung fehlgeschlagen, Zuweisung von %u Bytes"
#, c-format #, c-format
msgid "memory allocation failed, allocating %u bytes for native code" msgid "memory allocation failed, allocating %u bytes for native code"
msgstr "Speicherallozierung fehlgeschlagen, alloziere %u Bytes für nativen Code" msgstr ""
"Speicherallozierung fehlgeschlagen, alloziere %u Bytes für nativen Code"
msgid "memory allocation failed, heap is locked" msgid "memory allocation failed, heap is locked"
msgstr "Speicherzuweisung fehlgeschlagen, der Heap ist gesperrt" msgstr "Speicherzuweisung fehlgeschlagen, der Heap ist gesperrt"
@ -1782,7 +1808,9 @@ msgstr "ord erwartet ein Zeichen"
#, c-format #, c-format
msgid "ord() expected a character, but string of length %d found" msgid "ord() expected a character, but string of length %d found"
msgstr "ord() erwartet ein Zeichen aber es wurde eine Zeichenfolge mit Länge %d gefunden" msgstr ""
"ord() erwartet ein Zeichen aber es wurde eine Zeichenfolge mit Länge %d "
"gefunden"
msgid "overflow converting long int to machine word" msgid "overflow converting long int to machine word"
msgstr "" msgstr ""
@ -2029,7 +2057,9 @@ msgid "unicode name escapes"
msgstr "" msgstr ""
msgid "unindent does not match any outer indentation level" msgid "unindent does not match any outer indentation level"
msgstr "Einrückung entspricht keiner äußeren Einrückungsebene. Bitte Leerzeichen am Zeilenanfang kontrollieren!" msgstr ""
"Einrückung entspricht keiner äußeren Einrückungsebene. Bitte Leerzeichen am "
"Zeilenanfang kontrollieren!"
msgid "unknown config param" msgid "unknown config param"
msgstr "" msgstr ""
@ -2112,15 +2142,3 @@ msgstr "y Wert außerhalb der Grenzen"
msgid "zero step" msgid "zero step"
msgstr "" msgstr ""
#, c-format
msgid ""
"Only 16bpp RGB 565 supported for bitfield compressed BMPs; R:%d G:%d B:%d"
msgstr ""
#, c-format
msgid ""
"Only true color (24 bpp or higher), 16bpp 565 , and 8bpp grayscale BMP "
"supported %x"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-02-22 15:26-0800\n" "POT-Creation-Date: 2019-02-23 10:51-0800\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -730,6 +730,11 @@ msgstr ""
msgid "Odd parity is not supported" msgid "Odd parity is not supported"
msgstr "" msgstr ""
#, c-format
msgid ""
"Only 16bpp RGB 565 supported for bitfield compressed BMPs; R:%x G:%x B:%x"
msgstr ""
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "" msgstr ""
@ -744,7 +749,9 @@ msgid "Only slices with step=1 (aka None) are supported"
msgstr "" msgstr ""
#, c-format #, c-format
msgid "Only true color (24 bpp or higher) BMP supported %x" msgid ""
"Only true color (24 bpp or higher), 16bpp 565 and 555, and 8bpp grayscale "
"BMP supported %d"
msgstr "" msgstr ""
msgid "Only tx supported on UART1 (GPIO2)." msgid "Only tx supported on UART1 (GPIO2)."

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-02-22 15:26-0800\n" "POT-Creation-Date: 2019-02-23 10:51-0800\n"
"PO-Revision-Date: 2018-08-24 22:56-0500\n" "PO-Revision-Date: 2018-08-24 22:56-0500\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -770,6 +770,11 @@ msgstr ""
msgid "Odd parity is not supported" msgid "Odd parity is not supported"
msgstr "Paridad impar no soportada" msgstr "Paridad impar no soportada"
#, c-format
msgid ""
"Only 16bpp RGB 565 supported for bitfield compressed BMPs; R:%x G:%x B:%x"
msgstr ""
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "Solo mono de 8 o 16 bit con " msgstr "Solo mono de 8 o 16 bit con "
@ -785,8 +790,10 @@ msgid "Only slices with step=1 (aka None) are supported"
msgstr "solo se admiten segmentos con step=1 (alias None)" msgstr "solo se admiten segmentos con step=1 (alias None)"
#, c-format #, c-format
msgid "Only true color (24 bpp or higher) BMP supported %x" msgid ""
msgstr "Solo color verdadero (24 bpp o superior) BMP admitido %x" "Only true color (24 bpp or higher), 16bpp 565 and 555, and 8bpp grayscale "
"BMP supported %d"
msgstr ""
msgid "Only tx supported on UART1 (GPIO2)." msgid "Only tx supported on UART1 (GPIO2)."
msgstr "Solo tx soportada en UART1 (GPIO2)" msgstr "Solo tx soportada en UART1 (GPIO2)"
@ -2160,3 +2167,6 @@ msgstr "address fuera de límites"
msgid "zero step" msgid "zero step"
msgstr "paso cero" msgstr "paso cero"
#~ msgid "Only true color (24 bpp or higher) BMP supported %x"
#~ msgstr "Solo color verdadero (24 bpp o superior) BMP admitido %x"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-02-22 15:26-0800\n" "POT-Creation-Date: 2019-02-23 10:51-0800\n"
"PO-Revision-Date: 2018-12-20 22:15-0800\n" "PO-Revision-Date: 2018-12-20 22:15-0800\n"
"Last-Translator: Timothy <me@timothygarcia.ca>\n" "Last-Translator: Timothy <me@timothygarcia.ca>\n"
"Language-Team: fil\n" "Language-Team: fil\n"
@ -768,6 +768,11 @@ msgstr ""
msgid "Odd parity is not supported" msgid "Odd parity is not supported"
msgstr "Odd na parity ay hindi supportado" msgstr "Odd na parity ay hindi supportado"
#, c-format
msgid ""
"Only 16bpp RGB 565 supported for bitfield compressed BMPs; R:%x G:%x B:%x"
msgstr ""
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "Tanging 8 o 16 na bit mono na may " msgstr "Tanging 8 o 16 na bit mono na may "
@ -783,8 +788,10 @@ msgid "Only slices with step=1 (aka None) are supported"
msgstr "ang mga slices lamang na may hakbang = 1 (aka None) ang sinusuportahan" msgstr "ang mga slices lamang na may hakbang = 1 (aka None) ang sinusuportahan"
#, c-format #, c-format
msgid "Only true color (24 bpp or higher) BMP supported %x" msgid ""
msgstr "Dapat true color (24 bpp o mas mataas) BMP lamang ang supportado %x" "Only true color (24 bpp or higher), 16bpp 565 and 555, and 8bpp grayscale "
"BMP supported %d"
msgstr ""
msgid "Only tx supported on UART1 (GPIO2)." msgid "Only tx supported on UART1 (GPIO2)."
msgstr "Tanging suportado ang TX sa UART1 (GPIO2)." msgstr "Tanging suportado ang TX sa UART1 (GPIO2)."
@ -2166,3 +2173,6 @@ msgstr "wala sa sakop ang address"
msgid "zero step" msgid "zero step"
msgstr "zero step" msgstr "zero step"
#~ msgid "Only true color (24 bpp or higher) BMP supported %x"
#~ msgstr "Dapat true color (24 bpp o mas mataas) BMP lamang ang supportado %x"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 0.1\n" "Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-02-22 15:26-0800\n" "POT-Creation-Date: 2019-02-23 10:51-0800\n"
"PO-Revision-Date: 2018-12-23 20:05+0100\n" "PO-Revision-Date: 2018-12-23 20:05+0100\n"
"Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n" "Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n"
"Language-Team: fr\n" "Language-Team: fr\n"
@ -772,6 +772,11 @@ msgstr ""
msgid "Odd parity is not supported" msgid "Odd parity is not supported"
msgstr "parité impaire non supportée" msgstr "parité impaire non supportée"
#, c-format
msgid ""
"Only 16bpp RGB 565 supported for bitfield compressed BMPs; R:%x G:%x B:%x"
msgstr ""
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "Uniquement 8 ou 16 bit mono avec " msgstr "Uniquement 8 ou 16 bit mono avec "
@ -787,8 +792,10 @@ msgid "Only slices with step=1 (aka None) are supported"
msgstr "seuls les slices avec 'step=1' (cad None) sont supportées" msgstr "seuls les slices avec 'step=1' (cad None) sont supportées"
#, c-format #, c-format
msgid "Only true color (24 bpp or higher) BMP supported %x" msgid ""
msgstr "Seul les BMP 24bits ou plus sont supportés %x" "Only true color (24 bpp or higher), 16bpp 565 and 555, and 8bpp grayscale "
"BMP supported %d"
msgstr ""
msgid "Only tx supported on UART1 (GPIO2)." msgid "Only tx supported on UART1 (GPIO2)."
msgstr "Seul le tx est supporté sur l'UART1 (GPIO2)." msgstr "Seul le tx est supporté sur l'UART1 (GPIO2)."
@ -2190,3 +2197,6 @@ msgstr "adresse hors limites"
msgid "zero step" msgid "zero step"
msgstr "'step' nul" msgstr "'step' nul"
#~ msgid "Only true color (24 bpp or higher) BMP supported %x"
#~ msgstr "Seul les BMP 24bits ou plus sont supportés %x"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-02-22 15:26-0800\n" "POT-Creation-Date: 2019-02-23 10:51-0800\n"
"PO-Revision-Date: 2018-10-02 16:27+0200\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n"
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n" "Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
"Language-Team: \n" "Language-Team: \n"
@ -767,6 +767,11 @@ msgstr ""
msgid "Odd parity is not supported" msgid "Odd parity is not supported"
msgstr "operazione I2C non supportata" msgstr "operazione I2C non supportata"
#, c-format
msgid ""
"Only 16bpp RGB 565 supported for bitfield compressed BMPs; R:%x G:%x B:%x"
msgstr ""
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "" msgstr ""
@ -782,8 +787,10 @@ msgid "Only slices with step=1 (aka None) are supported"
msgstr "solo slice con step=1 (aka None) sono supportate" msgstr "solo slice con step=1 (aka None) sono supportate"
#, c-format #, c-format
msgid "Only true color (24 bpp or higher) BMP supported %x" msgid ""
msgstr "Solo BMP true color (24 bpp o superiore) sono supportati %x" "Only true color (24 bpp or higher), 16bpp 565 and 555, and 8bpp grayscale "
"BMP supported %d"
msgstr ""
msgid "Only tx supported on UART1 (GPIO2)." msgid "Only tx supported on UART1 (GPIO2)."
msgstr "Solo tx supportato su UART1 (GPIO2)." msgstr "Solo tx supportato su UART1 (GPIO2)."
@ -2162,3 +2169,6 @@ msgstr "indirizzo fuori limite"
msgid "zero step" msgid "zero step"
msgstr "zero step" msgstr "zero step"
#~ msgid "Only true color (24 bpp or higher) BMP supported %x"
#~ msgstr "Solo BMP true color (24 bpp o superiore) sono supportati %x"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-02-22 15:26-0800\n" "POT-Creation-Date: 2019-02-23 10:51-0800\n"
"PO-Revision-Date: 2018-10-02 21:14-0000\n" "PO-Revision-Date: 2018-10-02 21:14-0000\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -756,6 +756,11 @@ msgstr ""
msgid "Odd parity is not supported" msgid "Odd parity is not supported"
msgstr "I2C operação não suportada" msgstr "I2C operação não suportada"
#, c-format
msgid ""
"Only 16bpp RGB 565 supported for bitfield compressed BMPs; R:%x G:%x B:%x"
msgstr ""
msgid "Only 8 or 16 bit mono with " msgid "Only 8 or 16 bit mono with "
msgstr "" msgstr ""
@ -770,8 +775,10 @@ msgid "Only slices with step=1 (aka None) are supported"
msgstr "" msgstr ""
#, c-format #, c-format
msgid "Only true color (24 bpp or higher) BMP supported %x" msgid ""
msgstr "Apenas cores verdadeiras (24 bpp ou maior) BMP suportadas" "Only true color (24 bpp or higher), 16bpp 565 and 555, and 8bpp grayscale "
"BMP supported %d"
msgstr ""
msgid "Only tx supported on UART1 (GPIO2)." msgid "Only tx supported on UART1 (GPIO2)."
msgstr "Apenas TX suportado no UART1 (GPIO2)." msgstr "Apenas TX suportado no UART1 (GPIO2)."
@ -2110,3 +2117,6 @@ msgstr ""
msgid "zero step" msgid "zero step"
msgstr "passo zero" msgstr "passo zero"
#~ msgid "Only true color (24 bpp or higher) BMP supported %x"
#~ msgstr "Apenas cores verdadeiras (24 bpp ou maior) BMP suportadas"

View File

@ -16,3 +16,6 @@ CHIP_FAMILY = samd21
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
# To keep the build small
CIRCUITPY_I2CSLAVE = 0

View File

@ -38,13 +38,13 @@ static uint32_t read_word(uint16_t* bmp_header, uint16_t index) {
void common_hal_displayio_ondiskbitmap_construct(displayio_ondiskbitmap_t *self, pyb_file_obj_t* file) { void common_hal_displayio_ondiskbitmap_construct(displayio_ondiskbitmap_t *self, pyb_file_obj_t* file) {
// Load the wave // Load the wave
self->file = file; self->file = file;
uint16_t bmp_header[24]; uint16_t bmp_header[69];
f_rewind(&self->file->fp); f_rewind(&self->file->fp);
UINT bytes_read; UINT bytes_read;
if (f_read(&self->file->fp, bmp_header, 48, &bytes_read) != FR_OK) { if (f_read(&self->file->fp, bmp_header, 138, &bytes_read) != FR_OK) {
mp_raise_OSError(MP_EIO); mp_raise_OSError(MP_EIO);
} }
if (bytes_read != 48 || if (bytes_read != 138 ||
memcmp(bmp_header, "BM", 2) != 0) { memcmp(bmp_header, "BM", 2) != 0) {
mp_raise_ValueError(translate("Invalid BMP file")); mp_raise_ValueError(translate("Invalid BMP file"));
} }
@ -53,15 +53,35 @@ void common_hal_displayio_ondiskbitmap_construct(displayio_ondiskbitmap_t *self,
self->data_offset = read_word(bmp_header, 5); self->data_offset = read_word(bmp_header, 5);
uint32_t header_size = read_word(bmp_header, 7); uint32_t header_size = read_word(bmp_header, 7);
uint16_t bits_per_pixel = bmp_header[14];
uint32_t compression = read_word(bmp_header, 15); uint32_t compression = read_word(bmp_header, 15);
if (!(header_size == 12 || header_size == 40 || header_size == 108 || header_size == 124) || uint32_t number_of_colors = read_word(bmp_header, 23);
self->bitfield_compressed = (compression == 3);
self->grayscale = ((bits_per_pixel == 8) && (number_of_colors == 256));
if (bits_per_pixel == 16){
if (((header_size == 124) || (header_size == 56)) && (self->bitfield_compressed)) {
self->r_bitmask = read_word(bmp_header, 27);
self->g_bitmask = read_word(bmp_header, 29);
self->b_bitmask = read_word(bmp_header, 31);
if (!((self->r_bitmask == 0xf800) && (self->g_bitmask == 0x07e0) && (self->b_bitmask == 0x001f))){
mp_raise_ValueError_varg(translate("Only 16bpp RGB 565 supported for bitfield compressed BMPs; R:%x G:%x B:%x"),
self->r_bitmask, self->g_bitmask, self->b_bitmask);
}
} else if (header_size == 40){ // no bitmasks means 5:5:5
self->r_bitmask = 0x7c00;
self->g_bitmask = 0x3e0;
self->b_bitmask = 0x1f;
}
} else if (!(header_size == 12 || header_size == 40 || header_size == 108 || header_size == 124) ||
!(compression == 0)) { !(compression == 0)) {
mp_raise_ValueError_varg(translate("Only Windows format, uncompressed BMP supported %d"), header_size); mp_raise_ValueError_varg(translate("Only Windows format, uncompressed BMP supported %d"), header_size);
} }
// TODO(tannewt): Support bitfield compressed colors since RGB565 can be produced by the GIMP.
uint16_t bits_per_pixel = bmp_header[14]; if (bits_per_pixel < 16 && !(self->grayscale)) {
if (bits_per_pixel < 24) { mp_raise_ValueError_varg(translate("Only true color (24 bpp or higher), 16bpp 565 and 555, and 8bpp grayscale BMP supported %d"), bits_per_pixel);
mp_raise_ValueError_varg(translate("Only true color (24 bpp or higher) BMP supported %x"), bits_per_pixel);
} }
self->bytes_per_pixel = bits_per_pixel / 8; self->bytes_per_pixel = bits_per_pixel / 8;
self->width = read_word(bmp_header, 9); self->width = read_word(bmp_header, 9);
@ -87,8 +107,33 @@ uint32_t common_hal_displayio_ondiskbitmap_get_pixel(displayio_ondiskbitmap_t *s
uint32_t pixel = 0; uint32_t pixel = 0;
uint32_t result = f_read(&self->file->fp, &pixel, self->bytes_per_pixel, &bytes_read); uint32_t result = f_read(&self->file->fp, &pixel, self->bytes_per_pixel, &bytes_read);
if (result == FR_OK) { if (result == FR_OK) {
uint32_t tmp = 0;
uint8_t red;
uint8_t green;
uint8_t blue;
if (self->grayscale){
red = pixel;
green = pixel;
blue = pixel;
tmp = (red << 16 | green << 8 | blue);
return tmp;
} else if (self->bytes_per_pixel == 2) {
if (self->bitfield_compressed){
red =((pixel & self->r_bitmask) >>11);
green = ((pixel & self->g_bitmask) >>5);
blue = ((pixel & self->b_bitmask) >> 0);
} else {
red =((pixel & self->r_bitmask) >>10);
green = ((pixel & self->g_bitmask) >>4);
blue = ((pixel & self->b_bitmask) >> 0);
}
tmp = (red << 19 | green << 10 | blue << 3);
return tmp;
}else {
return pixel; return pixel;
} }
}
return 0; return 0;
} }

View File

@ -40,6 +40,11 @@ typedef struct {
uint16_t height; uint16_t height;
uint16_t data_offset; uint16_t data_offset;
uint16_t stride; uint16_t stride;
uint32_t r_bitmask;
uint32_t g_bitmask;
uint32_t b_bitmask;
bool bitfield_compressed;
bool grayscale;
pyb_file_obj_t* file; pyb_file_obj_t* file;
uint8_t bytes_per_pixel; uint8_t bytes_per_pixel;
} displayio_ondiskbitmap_t; } displayio_ondiskbitmap_t;