图片转c语言
先调用
图片库
,
把图片打开,存入内存里,然后把每个像素点的RGBV值改成想要的效果,
然后再写入文件。图片的操作可惜不能贴地址
2. 怎么将gif格式的图片转换为c语言程序
图片是不能转换成C程序的,只有通过调用,才能实现图片的输出。例如,我们常见的网游,就是通过一系列的调用其本身已有的图片或动画来实现的,所以做网游的公司里,学美术的人是必不可少的。
具体方法看书吧,书上都有详细的解答的。
3. 如何用C语言编程实现 把图片转换成有漫画效果的
先调用图片库,
把图片打开,存入内存里,然后把每个像素点的RGBV值改成想要的效果,
然后再写入文件。图片的操作可惜不能贴地址
4. 如何用C语言将GIF格式的图片转为数组
先转换成BMP图片,就是先写好文件头,再把数组写到后头
5. 怎么样把图片变成C语言
在网上搜Image2Lcd这个软件,可以把图片变成C语言数组(*.C)/二进制代码(*.bin)/BMP格式(*.bmp)/WBMP格式(*.wbmp);我在做手机屏测试,这个软件很好用。可以试一下,有问题再联系306315223.
6. bmp格式转换PNG格式 c语言或c++编程
BMP是最简单的图形存储格式,在c++里有朋友封装了一个类CDib.
只要把图片使用附件中编辑--粘贴来源找到图画打开另存为选择你想要的格式保存就可以了。也可以右键点击选择打开方式使用图画打开相同的方法。另外photoshop 和office2003的picture manage也有这个功能。
Private Sub mnuconvertBMPtoJPG_Click()
Dim tmpimage As imgdes ' Image descriptors
Dim tmp2image As imgdes
Dim rcode As Long
Dim quality As Long
Dim vbitcount As Long
Dim bdat As BITMAPINFOHEADER ' Reserve space for BMP struct
Dim bmp_fname As String
Dim jpg_fname As String
bmp_fname = "test.bmp"
jpg_fname = "test.jpg"
quality = 75
' Get info on the file we're to load
rcode = bmpinfo(bmp_fname, bdat)
If (rcode <> NO_ERROR) Then
MsgBox "Cannot find file", 0, "Error encountered!"
Exit Sub
End If
vbitcount = bdat.biBitCount
If (vbitcount >= 16) Then ' 16-, 24-, or 32-bit image is loaded into 24-bit buffer
vbitcount = 24
End If
' Allocate space for an image
rcode = allocimage(tmpimage, bdat.biWidth, bdat.biHeight, vbitcount)
If (rcode <> NO_ERROR) Then
MsgBox "Not enough memory", 0, "Error encountered!"
Exit Sub
End If
' Load image
rcode = loadbmp(bmp_fname, tmpimage)
If (rcode <> NO_ERROR) Then
freeimage tmpimage ' Free image on error
MsgBox "Cannot load file", 0, "Error encountered!"
Exit Sub
End If
If (vbitcount = 1) Then ' If we loaded a 1-bit image, convert to 8-bit grayscale
' because jpeg only supports 8-bit grayscale or 24-bit color images
rcode = allocimage(tmp2image, bdat.biWidth, bdat.biHeight, 8)
If (rcode = NO_ERROR) Then
rcode = convert1bitto8bit(tmpimage, tmp2image)
freeimage tmpimage ' Replace 1-bit image with grayscale image
imgdes tmp2image, tmpimage
End If
End If
' Save image
rcode = savejpg(jpg_fname, tmpimage, quality)
freeimage tmpimage
End Sub
........... Add these defines and declarations to your Global mole ...........
' Image descriptor
Type imgdes
ibuff As Long
stx As Long
sty As Long
endx As Long
endy As Long
buffwidth As Long
palette As Long
colors As Long
imgtype As Long
bmh As Long
hBitmap As Long
End Type
Type BITMAPINFOHEADER
biSize As Long
biWidth As Long
biHeight As Long
biPlanes As Integer
biBitCount As Integer
biCompression As Long
biSizeImage As Long
biXPelsPerMeter As Long
biYPelsPerMeter As Long
biClrUsed As Long
biClrImportant As Long
End Type
Declare Function bmpinfo Lib "VIC32.DLL" (ByVal Fname As String, bdat As BITMAPINFOHEADER) As Long
Declare Function allocimage Lib "VIC32.DLL" (image As imgdes, ByVal wid As Long, ByVal leng As Long, ByVal BPPixel As Long) As Long
Declare Function loadbmp Lib "VIC32.DLL" (ByVal Fname As String, desimg As imgdes) As Long
Declare Sub freeimage Lib "VIC32.DLL" (image As imgdes)
Declare Function convert1bitto8bit Lib "VIC32.DLL" (srcimg As imgdes, desimg As imgdes) As Long
Declare Sub imgdes Lib "VIC32.DLL" (srcimg As imgdes, desimg As imgdes)
Declare Function savejpg Lib "VIC32.DLL" (ByVal Fname As String, srcimg As imgdes, ByVal quality As Long) As Long
《图像处理----做一个自己的photoshop》
大部分都是源码,其中有bmp<-->jgep<-->GIF的代码.
7. 有没有把 图片的图形转换为 符号或者 数字的软件,用于在C语言输出.
配合easyx库,C本身就可以实现
http://codebus.easyx.cn/contributor/post/picture-into-ascii-chart
8. 简述:将一张图片转换成源程序的软件。 详细:用C语言可以画一张由基本图形组成的一张图,可以作为程序
C语言不是写界面的,所以没有,android是有的,而且按照你的要求,你说的这个东西叫IDE,有实力你自己去开发吧
9. 怎样把图片转换成代码,用于C语言开发的软件中
图片转换成代码 -- scaner (扫描仪)就是干这个的。
有的三合一打印机(打印机,fax, 扫描仪三合一)也可以干这个。
数码相机也干这个。图片转换成的格式有 jpg,bmp,tif 等等,许多程序和软件都能处理。