DAlexV |
Дата: Сб, 05.02.2011, 13:28 | Сообщение # 7 |
Группа:
Проверенные
Ранг:
Разобрался
Сообщений:
657
Замечания:
±
На сайте с 13.05.2008
Статус:
Offline
|
Цитата MasterPic по поводу загрузки картинки в GLCD. Не могли бы вы привести понятное простым смертным объяснения этого процесса? Как, что и почему? Как вычисляется размер кода картинки, ну в общем, поподробней, пожалуйста. http://picbasic.ru/forum/28-244-1 здесь есть пример в том числе и загрузки картинки. Картинка создается программой Monochrome Image Converter Выбираем размер кантинки. Создается окно для редактирования. Как в любом графическом редакторе создаем нужную картинку. Жмем кнопку View Code. Появляется окно с Кодом.
Код Код // Image with Y - Direction Bytes Public Const New_Image(1028) As Byte = ($01,128,64,0, $21, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 , $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $40, $4 0, $40, $40, $40, $40, $40, $C0, $40, $40, $40, $40, $40, $40, $40, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,$00, $00, $00, $00, $00, $00, $00, $A6, $01, $01 , $03, $02, $02, $02, $02, $02, $02, $FE, $00, $00, $00, $00, $00, $00, $49, $02, $02, $02, $02, $02, $06, $18, $F0, $00, $00, $00, $00, $00, $00, $00, $A8, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $F0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $BC, $04, $04, $04, $08, $08, $F8, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $78, $06, $03, $01, $01, $01, $01, $01, $01, $01, $83, $7E, $00, $00, $00, $00, $00, $00, $00, $00, $00, $0 0, $00, $00, $00, $00, $00, $FF, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $00, $00 , $00, $00, $00, $00, $00, $00, $00, $FF, $00, $00, $00, $00, $00, $00, $B7, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $00, $00, $00, $00, $00, $00, $FF, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $3E, $FF, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $EA, $30, $30, $30, $38, $28, $27, $20, $20, $20, $60, $C0, $00, $00, $00, $00, $00, $00, $F0, $1F, $10, $10, $10, $10, $18, $08, $08, $04, $06, $02, $03, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $0 0, $00, $00, $00, $00, $00, $FF, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $00, $00 , $00, $00, $00, $00, $00, $00, $00, $FF, $00, $00, $00, $00, $00, $00, $BE, $04, $04, $04, $04, $04, $04, $04, $04, $07, $00, $00, $00, $00, $00, $00, $FF, $00, $00, $00, $00, $00, $00, $80, $78, $0F, $00, $FF, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $F5, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $00, $00, $00, $00, $00, $00, $3F, $C0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $0 0, $00, $00, $00, $00, $00, $01, $FF, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $7F, $00, $00 , $00, $00, $00, $00, $00, $00, $00, $3F, $00, $00, $00, $00, $00, $00, $F7, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $3F, $20, $20, $20, $10, $18, $07, $00, $00, $00, $00, $1F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $1F, $04, $04, $04, $04, $04, $04, $04, $04, $04, $04, $03, $00, $00, $00, $00, $00, $00, $00, $01, $0E, $08, $10, $10, $20, $20, $20, $30, $10, $10, $08, $08, $00, $00, $00, $00, $00, $00, $00, $00, $00, $0 0, $00, $00, $00, $00, $00, $00, $0F, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 , $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $03, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $0 0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 , $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $0 0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00)
Где: New_Image - имя изображения (1028) As Byte -размер картинки в байтах $01,128,64,0 - [ориентирование картинки Y][Длинна][высота] далее жмем COPY&Close. В Рыбе создаем новый лист и вставляем туда код. В первой строке пишем название модуля Module IMG . Сохраняем все это безобразие в папку с проектом под названием IMG.bas например. В основной программе подключаем нашу картинку. Include "IMG.bas" В нужном месте вызываем строчкой GLCD.SetImage(0,0,New_Image)
Будьте оригинальны-не повторяйте чужих ошибок ! Рыба сдохла. Теперь STM32(TS)+C#(VS).Старею :)
|
|
|
|