⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subject_26234.htm

📁 一些关于vc的问答
💻 HTM
字号:
<p>
序号:26234 发表者:apple_caro 发表日期:2002-12-30 11:56:23
<br>主题:[求]可以把bmp文件变成jpg 文件的example.
<br>内容:谢谢。
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:bird 回复日期:2002-12-30 12:58:36
<br>内容:http://vbaccelerator.com/codelib/gfx/vbjpeg.htm
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:bird 回复日期:2002-12-30 12:58:48
<br>内容:http://www.colosseumbuilders.com/graphicslinks.htm
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:不说 回复日期:2002-12-30 22:47:07
<br>内容:#include &lt;windows.h&gt;<BR>#include &lt;gdiplus.h&gt;<BR>#include &lt;stdio.h&gt;<BR>using namespace Gdiplus;<BR><BR>INT GetEncoderClsid(const WCHAR* format, CLSID* pClsid);&nbsp;&nbsp;// helper function<BR><BR>INT main()<BR>{<BR>&nbsp;&nbsp; // Initialize GDI+.<BR>&nbsp;&nbsp; GdiplusStartupInput gdiplusStartupInput;<BR>&nbsp;&nbsp; ULONG_PTR gdiplusToken;<BR>&nbsp;&nbsp; GdiplusStartup(&amp;gdiplusToken, &amp;gdiplusStartupInput, NULL);<BR><BR>&nbsp;&nbsp; CLSID&nbsp;&nbsp; encoderClsid;<BR>&nbsp;&nbsp; Status&nbsp;&nbsp;stat;<BR>&nbsp;&nbsp; Image*&nbsp;&nbsp; image = new Image(L"Bird.bmp");<BR><BR>&nbsp;&nbsp; // Get the CLSID of the PNG encoder.<BR>&nbsp;&nbsp; GetEncoderClsid(L"image/jpg", &amp;encoderClsid);<BR><BR>&nbsp;&nbsp; stat = image-&gt;Save(L"Bird.jpg", &amp;encoderClsid, NULL);<BR><BR>&nbsp;&nbsp; if(stat == Ok)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf("Bird.png was saved successfully\n");<BR>&nbsp;&nbsp; else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf("Failure: stat = %d\n", stat); <BR><BR>&nbsp;&nbsp; delete image;<BR>&nbsp;&nbsp; GdiplusShutdown(gdiplusToken);<BR>&nbsp;&nbsp; return 0;<BR>}<BR><BR>搞定!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:不说 回复日期:2002-12-31 14:27:16
<br>内容:啊?这样就接受啦?我还以为至少得问问关于GDI+的东西呢……这段代码编译都通不过啊……
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -