LCD显示图片的函数-ARM体系-2440
2017-08-21 16:25
288 查看
void Paint_BMP(int x0,int y0,int level,int vertical,const unsigned char *bmp)/*在屏幕上画图*/
{
int x,y;
UINT32 col;
int p = 0;
UINT16 *addr;
for( y = 0 ; y < 272 ; y++ )
{
for( x = 0 ; x < 480 ; x++ )
{
col = bmp[p+1] | (bmp[p]<<8) ;
// if ( ( (x0+x) < SCR_XSIZE) && ( (y0+y) < SCR_YSIZE) )
// LCD_BUFFER[y0+y][x0+x] = c ;
PutPixel1(x0+x, y0+y, col);
p += 2 ;
}
}
}
void PutPixel1(UINT32 x, UINT32 y, UINT32 color)
{
UINT8 red,green,blue;
switch (bpp){
case 16:
{
UINT16 *addr = (UINT16 *)fb_base_addr + (y * xsize + x);
*addr = (UINT16) color;
break;
}
case 8:
{
UINT8 *addr = (UINT8 *)fb_base_addr + (y * xsize + x);
*addr = (UINT8) color;
break;
}
default:
break;
}
}
{
int x,y;
UINT32 col;
int p = 0;
UINT16 *addr;
for( y = 0 ; y < 272 ; y++ )
{
for( x = 0 ; x < 480 ; x++ )
{
col = bmp[p+1] | (bmp[p]<<8) ;
// if ( ( (x0+x) < SCR_XSIZE) && ( (y0+y) < SCR_YSIZE) )
// LCD_BUFFER[y0+y][x0+x] = c ;
PutPixel1(x0+x, y0+y, col);
p += 2 ;
}
}
}
void PutPixel1(UINT32 x, UINT32 y, UINT32 color)
{
UINT8 red,green,blue;
switch (bpp){
case 16:
{
UINT16 *addr = (UINT16 *)fb_base_addr + (y * xsize + x);
*addr = (UINT16) color;
break;
}
case 8:
{
UINT8 *addr = (UINT8 *)fb_base_addr + (y * xsize + x);
*addr = (UINT8) color;
break;
}
default:
break;
}
}
相关文章推荐
- LCD显示文字的函数-ARM体系-2440
- 深入理解ARM体系架构(S3C6410)---lcd 显示图片
- 2440ARM开发板按键_LCD切换显示3张图片
- LCD浮点数显示函数的探讨
- Javascript 控制图片显示大小函数 By Stabx, 第二版
- 解决使用CImage类的Draw函数在显示图片时引起的图像失真问题
- php 随机显示图片的函数(实例)
- php 随机显示图片的函数(实例分享)
- jquery中fadein函数实现图片逐渐清晰显示
- 图片尺寸自定义显示函数
- VB使用Bitblt等函数,源图片不完全显示导致不能实现功能的解决办法
- 使用 javascript 函数 完美控制页面图片显示大小 By shawl.qiu
- PIL中Image模块的show函数无法正常显示图片
- lcd 12864液晶 显示图片
- 求助:想实现点击按钮“下一张”就会显示下一张图片的函数
- LCD浮点数显示函数的探讨
- LCD 显示文字与图片
- 显示JPG和GIF图片的函数
- Java程序打包后图片不显示:Java的insertIcon函数打包后,路径问题
- 使用 javascript 函数 完美控制页面图片显示大小(第二版) By shawl.qiu