<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>rexis.cn &#187; program</title>
	<atom:link href="http://blog.rexis.cn/category/program/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.rexis.cn</link>
	<description>一张相片 一段故事</description>
	<lastBuildDate>Fri, 02 Jul 2010 04:25:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>在iphone app中添加音量控制条</title>
		<link>http://blog.rexis.cn/2010/07/02/%e5%9c%a8iphone-app%e4%b8%ad%e6%b7%bb%e5%8a%a0%e9%9f%b3%e9%87%8f%e6%8e%a7%e5%88%b6%e6%9d%a1/</link>
		<comments>http://blog.rexis.cn/2010/07/02/%e5%9c%a8iphone-app%e4%b8%ad%e6%b7%bb%e5%8a%a0%e9%9f%b3%e9%87%8f%e6%8e%a7%e5%88%b6%e6%9d%a1/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 04:25:11 +0000</pubDate>
		<dc:creator>北</dc:creator>
				<category><![CDATA[iphone开发]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[sdk]]></category>

		<guid isPermaLink="false">http://blog.rexis.cn/?p=169</guid>
		<description><![CDATA[1. 添加MediaPlayer.framework 2. #import &#60;MediaPlayer/MPVolumeView.h&#62; 3. 代码 MPVolumeView *volumeView = &#91;&#91;&#91;MPVolumeView alloc&#93; initWithFrame:CGRectMake&#40;18, 380, 284, 23&#41;&#93; autorelease&#93;; volumeView.center = CGPointMake&#40;160,380&#41;; &#91;volumeView sizeToFit&#93;; &#91;self.view addSubview:volumeView&#93;;]]></description>
			<content:encoded><![CDATA[<p>1. 添加MediaPlayer.framework<br />
2. #import &lt;MediaPlayer/MPVolumeView.h&gt;<br />
3. 代码</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;">	MPVolumeView <span style="color: #002200;">*</span>volumeView <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>MPVolumeView alloc<span style="color: #002200;">&#93;</span>  initWithFrame<span style="color: #002200;">:</span>CGRectMake<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">18</span>, <span style="color: #2400d9;">380</span>, <span style="color: #2400d9;">284</span>, <span style="color: #2400d9;">23</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span> autorelease<span style="color: #002200;">&#93;</span>;
	volumeView.center <span style="color: #002200;">=</span> CGPointMake<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">160</span>,<span style="color: #2400d9;">380</span><span style="color: #002200;">&#41;</span>;
	<span style="color: #002200;">&#91;</span>volumeView sizeToFit<span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>self.view addSubview<span style="color: #002200;">:</span>volumeView<span style="color: #002200;">&#93;</span>;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.rexis.cn/2010/07/02/%e5%9c%a8iphone-app%e4%b8%ad%e6%b7%bb%e5%8a%a0%e9%9f%b3%e9%87%8f%e6%8e%a7%e5%88%b6%e6%9d%a1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iphone程序中跳转到appstore评论界面</title>
		<link>http://blog.rexis.cn/2010/05/25/iphone%e7%a8%8b%e5%ba%8f%e4%b8%ad%e8%b7%b3%e8%bd%ac%e5%88%b0appstore%e8%af%84%e8%ae%ba%e7%95%8c%e9%9d%a2/</link>
		<comments>http://blog.rexis.cn/2010/05/25/iphone%e7%a8%8b%e5%ba%8f%e4%b8%ad%e8%b7%b3%e8%bd%ac%e5%88%b0appstore%e8%af%84%e8%ae%ba%e7%95%8c%e9%9d%a2/#comments</comments>
		<pubDate>Tue, 25 May 2010 04:13:59 +0000</pubDate>
		<dc:creator>北</dc:creator>
				<category><![CDATA[iphone开发]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[objective-c]]></category>

		<guid isPermaLink="false">http://blog.rexis.cn/?p=166</guid>
		<description><![CDATA[在程序中加入appstore的review跳转，实现方法很简单，就是让系统去打开一个review的链接，代码如下： - &#40;void&#41; gotoWriteReviews &#123; NSString* appID = NSLocalizedString&#40;@&#34;itunesconnect_appid&#34;, nil&#41;; //这里是itunes connect生成的一串数字id NSString *u = &#91;NSString stringWithFormat:@&#34;http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=%@&#38;onlyLatestVersion=true&#38;pageNumber=0&#38;sortOrdering=1&#38;type=Purple+Software&#34;,appID&#93;; &#91;&#91;UIApplication sharedApplication&#93; openURL:&#91;NSURL URLWithString:u&#93;&#93;; &#125;]]></description>
			<content:encoded><![CDATA[<p>在程序中加入appstore的review跳转，实现方法很简单，就是让系统去打开一个review的链接，代码如下：</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> gotoWriteReviews <span style="color: #002200;">&#123;</span>
	<span style="color: #400080;">NSString</span><span style="color: #002200;">*</span> appID <span style="color: #002200;">=</span> NSLocalizedString<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;itunesconnect_appid&quot;</span>, <span style="color: #a61390;">nil</span><span style="color: #002200;">&#41;</span>;	<span style="color: #11740a; font-style: italic;">//这里是itunes connect生成的一串数字id</span>
	<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>u <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=%@&amp;onlyLatestVersion=true&amp;pageNumber=0&amp;sortOrdering=1&amp;type=Purple+Software&quot;</span>,appID<span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIApplication sharedApplication<span style="color: #002200;">&#93;</span> openURL<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSURL</span> URLWithString<span style="color: #002200;">:</span>u<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.rexis.cn/2010/05/25/iphone%e7%a8%8b%e5%ba%8f%e4%b8%ad%e8%b7%b3%e8%bd%ac%e5%88%b0appstore%e8%af%84%e8%ae%ba%e7%95%8c%e9%9d%a2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在图片上盖一层mask</title>
		<link>http://blog.rexis.cn/2010/05/20/%e5%9c%a8%e5%9b%be%e7%89%87%e4%b8%8a%e7%9b%96%e4%b8%80%e5%b1%82mask/</link>
		<comments>http://blog.rexis.cn/2010/05/20/%e5%9c%a8%e5%9b%be%e7%89%87%e4%b8%8a%e7%9b%96%e4%b8%80%e5%b1%82mask/#comments</comments>
		<pubDate>Thu, 20 May 2010 15:59:35 +0000</pubDate>
		<dc:creator>北</dc:creator>
				<category><![CDATA[iphone开发]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[mask]]></category>
		<category><![CDATA[objective-c]]></category>

		<guid isPermaLink="false">http://blog.rexis.cn/?p=161</guid>
		<description><![CDATA[- &#40;UIImage*&#41; createImage:&#40;UIImage*&#41;_image withMask:&#40;UIImage*&#41;_mask &#123; CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB&#40;&#41;; CGContextRef context = CGBitmapContextCreate&#40;NULL, _image.size.width, _image.size.height, 8, 0, colorSpace, kCGImageAlphaPremultipliedLast&#41;; CGColorSpaceRelease&#40;colorSpace&#41;; &#160; CGRect rect = CGRectMake&#40;0, 0, _image.size.width, _image.size.height&#41;; UIColor *bColor = &#91;UIColor colorWithRed:0 green:0 blue:0 alpha:1&#93;; CGContextSetFillColorWithColor&#40;context, &#91;bColor CGColor&#93;&#41;; //黑色是不透明，白色是透明 CGContextFillRect&#40;context, rect&#41;; CGContextClipToMask&#40;context, rect, &#91;_mask CGImage&#93;&#41;; CGContextDrawImage&#40;context, rect, &#91;_image CGImage&#93;&#41;; &#160; CGImageRef newImage = CGBitmapContextCreateImage&#40;context&#41;; [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>UIImage<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> createImage<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIImage<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>_image withMask<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIImage<span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>_mask <span style="color: #002200;">&#123;</span>
	CGColorSpaceRef colorSpace <span style="color: #002200;">=</span> CGColorSpaceCreateDeviceRGB<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#41;</span>;
	CGContextRef context <span style="color: #002200;">=</span> CGBitmapContextCreate<span style="color: #002200;">&#40;</span><span style="color: #a61390;">NULL</span>,
						 _image.size.width,
						 _image.size.height,
						 <span style="color: #2400d9;">8</span>, <span style="color: #2400d9;">0</span>,
						 colorSpace,
						kCGImageAlphaPremultipliedLast<span style="color: #002200;">&#41;</span>;
	CGColorSpaceRelease<span style="color: #002200;">&#40;</span>colorSpace<span style="color: #002200;">&#41;</span>;
&nbsp;
	CGRect rect <span style="color: #002200;">=</span> CGRectMake<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">0</span>, <span style="color: #2400d9;">0</span>, _image.size.width, _image.size.height<span style="color: #002200;">&#41;</span>;
	UIColor <span style="color: #002200;">*</span>bColor <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>UIColor colorWithRed<span style="color: #002200;">:</span><span style="color: #2400d9;">0</span> green<span style="color: #002200;">:</span><span style="color: #2400d9;">0</span> blue<span style="color: #002200;">:</span><span style="color: #2400d9;">0</span> alpha<span style="color: #002200;">:</span><span style="color: #2400d9;">1</span><span style="color: #002200;">&#93;</span>;
	CGContextSetFillColorWithColor<span style="color: #002200;">&#40;</span>context, <span style="color: #002200;">&#91;</span>bColor CGColor<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>;                     <span style="color: #11740a; font-style: italic;">//黑色是不透明，白色是透明</span>
	CGContextFillRect<span style="color: #002200;">&#40;</span>context, rect<span style="color: #002200;">&#41;</span>;
	CGContextClipToMask<span style="color: #002200;">&#40;</span>context, rect, <span style="color: #002200;">&#91;</span>_mask CGImage<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>;
	CGContextDrawImage<span style="color: #002200;">&#40;</span>context, rect, <span style="color: #002200;">&#91;</span>_image CGImage<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>;
&nbsp;
	CGImageRef newImage <span style="color: #002200;">=</span> CGBitmapContextCreateImage<span style="color: #002200;">&#40;</span>context<span style="color: #002200;">&#41;</span>;
	CGContextRelease<span style="color: #002200;">&#40;</span>context<span style="color: #002200;">&#41;</span>;
&nbsp;
	UIImage<span style="color: #002200;">*</span> _newImage <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIImage alloc<span style="color: #002200;">&#93;</span> initWithCGImage<span style="color: #002200;">:</span>newImage<span style="color: #002200;">&#93;</span>;
	CGImageRelease<span style="color: #002200;">&#40;</span>newImage<span style="color: #002200;">&#41;</span>;
&nbsp;
	<span style="color: #a61390;">return</span> <span style="color: #002200;">&#91;</span>_newImage autorelease<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>最先创建了一个灰度的颜色空间导致合成出来的mask颜色都是反的，黑色的显出白色，后来发现一篇例子是用RGB颜色空间来做再自己加上黑色填充后就得到了想要的效果，效果图：<br />
<img src="http://blog.rexis.cn/wp-content/uploads/2010/05/IMG_0141.jpg" alt="lomo效果" title="lomo效果" width="640" height="428" class="aligncenter size-full wp-image-162" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rexis.cn/2010/05/20/%e5%9c%a8%e5%9b%be%e7%89%87%e4%b8%8a%e7%9b%96%e4%b8%80%e5%b1%82mask/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在UIViewController中用多线程更新UI的异常</title>
		<link>http://blog.rexis.cn/2009/11/15/%e5%9c%a8uiviewcontroller%e4%b8%ad%e7%94%a8%e5%a4%9a%e7%ba%bf%e7%a8%8b%e6%9b%b4%e6%96%b0ui%e7%9a%84%e5%bc%82%e5%b8%b8/</link>
		<comments>http://blog.rexis.cn/2009/11/15/%e5%9c%a8uiviewcontroller%e4%b8%ad%e7%94%a8%e5%a4%9a%e7%ba%bf%e7%a8%8b%e6%9b%b4%e6%96%b0ui%e7%9a%84%e5%bc%82%e5%b8%b8/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 16:06:54 +0000</pubDate>
		<dc:creator>北</dc:creator>
				<category><![CDATA[program]]></category>

		<guid isPermaLink="false">http://rexis.cn/blog/?p=121</guid>
		<description><![CDATA[在UIViewController中用多线程时,如果该线程方法中有更新UI操作的话,会抛出如下错误: Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result of calling to UIKit from a secondary thread. Crashing now… 貌似是因为UIKit是非线程安全的,所以更新UI只能在主线程中操作,解决的办法: - &#40;void&#41;performSelectorOnMainThread:&#40;SEL&#41;aSelector withObject:&#40;id&#41;arg waitUntilDone:&#40;BOOL&#41;wait 用该方法指定要执行的UI更新Method在主线程中执行.]]></description>
			<content:encoded><![CDATA[<p>在UIViewController中用多线程时,如果该线程方法中有更新UI操作的话,会抛出如下错误:</p>
<p>Tried to obtain the web lock from a thread other than the main thread or the web thread.<br />
This may be a result of calling to UIKit from a secondary thread. Crashing now…</p>
<p>貌似是因为UIKit是非线程安全的,所以更新UI只能在主线程中操作,解决的办法:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>performSelectorOnMainThread<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">SEL</span><span style="color: #002200;">&#41;</span>aSelector withObject<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">id</span><span style="color: #002200;">&#41;</span>arg waitUntilDone<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>wait</pre></div></div>

<p>用该方法指定要执行的UI更新Method在主线程中执行.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rexis.cn/2009/11/15/%e5%9c%a8uiviewcontroller%e4%b8%ad%e7%94%a8%e5%a4%9a%e7%ba%bf%e7%a8%8b%e6%9b%b4%e6%96%b0ui%e7%9a%84%e5%bc%82%e5%b8%b8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>json for objective-c</title>
		<link>http://blog.rexis.cn/2009/08/18/json-for-objective-c/</link>
		<comments>http://blog.rexis.cn/2009/08/18/json-for-objective-c/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 01:26:06 +0000</pubDate>
		<dc:creator>北</dc:creator>
				<category><![CDATA[program]]></category>
		<category><![CDATA[objective-c framework json]]></category>

		<guid isPermaLink="false">http://rexis.cn/blog/?p=96</guid>
		<description><![CDATA[一个json对象和NSDictionary对象相互转换的framework project home: http://code.google.com/p/json-framework/]]></description>
			<content:encoded><![CDATA[<p>一个json对象和NSDictionary对象相互转换的framework</p>
<p>project home:<br />
<a href="http://code.google.com/p/json-framework/">http://code.google.com/p/json-framework/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rexis.cn/2009/08/18/json-for-objective-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iphone状态栏网络标志</title>
		<link>http://blog.rexis.cn/2009/08/14/iphone%e7%8a%b6%e6%80%81%e6%a0%8f%e7%bd%91%e7%bb%9c%e6%a0%87%e5%bf%97/</link>
		<comments>http://blog.rexis.cn/2009/08/14/iphone%e7%8a%b6%e6%80%81%e6%a0%8f%e7%bd%91%e7%bb%9c%e6%a0%87%e5%bf%97/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 04:50:06 +0000</pubDate>
		<dc:creator>北</dc:creator>
				<category><![CDATA[program]]></category>
		<category><![CDATA[iphone 开发 cocoa]]></category>

		<guid isPermaLink="false">http://rexis.cn/blog/?p=93</guid>
		<description><![CDATA[控制状态栏网络标志（就是有数据连接时显示一个转阿转的小图标） //显示 [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; //隐藏 [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;]]></description>
			<content:encoded><![CDATA[<p>控制状态栏网络标志（就是有数据连接时显示一个转阿转的小图标）<br />
//显示<br />
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;</p>
<p>//隐藏<br />
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rexis.cn/2009/08/14/iphone%e7%8a%b6%e6%80%81%e6%a0%8f%e7%bd%91%e7%bb%9c%e6%a0%87%e5%bf%97/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>log4j配置环境变量迂回法</title>
		<link>http://blog.rexis.cn/2009/05/30/log4j%e9%85%8d%e7%bd%ae%e7%8e%af%e5%a2%83%e5%8f%98%e9%87%8f%e8%bf%82%e5%9b%9e%e6%b3%95/</link>
		<comments>http://blog.rexis.cn/2009/05/30/log4j%e9%85%8d%e7%bd%ae%e7%8e%af%e5%a2%83%e5%8f%98%e9%87%8f%e8%bf%82%e5%9b%9e%e6%b3%95/#comments</comments>
		<pubDate>Fri, 29 May 2009 18:10:53 +0000</pubDate>
		<dc:creator>北</dc:creator>
				<category><![CDATA[program]]></category>
		<category><![CDATA[JAVA log4j]]></category>

		<guid isPermaLink="false">http://rexis.cn/blog/?p=81</guid>
		<description><![CDATA[在log4j.properties中配置输入文件 log4j.appender.A1.File= ${JBOSS_HOME}/server/default/log/my.log JAVA中加载配置 //从系统环境变量中取出JBOSS_HOME路径设置为系统property System.setProperty(&#8220;JBOSS_HOME&#8221;, System.getenv(&#8220;JBOSS_HOME&#8221;)); //读取log4j配置 PropertyConfigurator.configure(this.class.getResource(“/”).getPath() + “log4j.properties”); logger = Logger.getLogger(this.class);]]></description>
			<content:encoded><![CDATA[<p>在log4j.properties中配置输入文件<br />
log4j.appender.A1.File= ${JBOSS_HOME}/server/default/log/my.log</p>
<p>JAVA中加载配置<br />
//从系统环境变量中取出JBOSS_HOME路径设置为系统property<br />
System.setProperty(&#8220;JBOSS_HOME&#8221;, System.getenv(&#8220;JBOSS_HOME&#8221;));<br />
//读取log4j配置<br />
PropertyConfigurator.configure(this.class.getResource(“/”).getPath() + “log4j.properties”);<br />
logger = Logger.getLogger(this.class);</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rexis.cn/2009/05/30/log4j%e9%85%8d%e7%bd%ae%e7%8e%af%e5%a2%83%e5%8f%98%e9%87%8f%e8%bf%82%e5%9b%9e%e6%b3%95/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>相册登场</title>
		<link>http://blog.rexis.cn/2008/07/18/%e7%9b%b8%e5%86%8c%e7%99%bb%e5%9c%ba/</link>
		<comments>http://blog.rexis.cn/2008/07/18/%e7%9b%b8%e5%86%8c%e7%99%bb%e5%9c%ba/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 17:15:59 +0000</pubDate>
		<dc:creator>北</dc:creator>
				<category><![CDATA[program]]></category>

		<guid isPermaLink="false">http://blog.rexis.cn/2008/07/18/%e7%9b%b8%e5%86%8c%e7%99%bb%e5%9c%ba/</guid>
		<description><![CDATA[用Fleaphp写了一个相册程序 雏形已经有了 不过还会陆续完善 地址：http://rexis.cn/blog/album/]]></description>
			<content:encoded><![CDATA[<p>用Fleaphp写了一个相册程序</p>
<p>雏形已经有了 不过还会陆续完善</p>
<p>地址：<a href="http://rexis.cn/blog/album/" target="_blank">http://rexis.cn/blog/album/ </a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rexis.cn/2008/07/18/%e7%9b%b8%e5%86%8c%e7%99%bb%e5%9c%ba/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.net读取Excel文件中的图片</title>
		<link>http://blog.rexis.cn/2007/08/03/net%e8%af%bb%e5%8f%96excel%e6%96%87%e4%bb%b6%e4%b8%ad%e7%9a%84%e5%9b%be%e7%89%87/</link>
		<comments>http://blog.rexis.cn/2007/08/03/net%e8%af%bb%e5%8f%96excel%e6%96%87%e4%bb%b6%e4%b8%ad%e7%9a%84%e5%9b%be%e7%89%87/#comments</comments>
		<pubDate>Fri, 03 Aug 2007 04:55:20 +0000</pubDate>
		<dc:creator>北</dc:creator>
				<category><![CDATA[program]]></category>

		<guid isPermaLink="false">http://rexis.whode.com/wordpress/?p=10</guid>
		<description><![CDATA[首先要在项目中引入一个Excel的COM组件excel.dll 假设C盘根目录下存在a.xls的文件，在单元格第2行第2列存在要读取的图片 //引用Excel命名空间 using Excel;//...... //下面从a.xls中的2,2格复制图片到剪贴板，然后从剪贴板读取图片并显示到pictureBox1中。 private void btnGetImageFromExcel_Click(object sender, EventArgs e) { //初始化excel对象 Excel.Application excel = new Excel.Application(); //打开xls文件（注意：后面的参数都用Type.Missing填充，表示使用参数的默认值） excel.Workbooks.Open(@"C:\a.xls", System.Type.Missing, System.Type.Missing, System.Type.Missing, System.Type.Missing, System.Type.Missing, System.Type.Missing, System.Type.Missing, System.Type.Missing, System.Type.Missing, System.Type.Missing, System.Type.Missing, System.Type.Missing); //选定到第2行第2列所在的单元格 Range r = (Range)excel.Cells[2, 2]; r.Select(); //将单元格复制到剪贴板中 r.CopyPicture(XlPictureAppearance.xlScreen, XlCopyPictureFormat.xlBitmap); //退出excel excel.Quit(); //判断剪贴板中是否存在图片，如果存在，则将图片显示到pictureBox1中 if (Clipboard.ContainsImage()) { Image image=Clipboard.GetImage(); pictureBox1.Image = image; } [...]]]></description>
			<content:encoded><![CDATA[<p>首先要在项目中引入一个Excel的COM组件excel.dll</p>
<p>假设C盘根目录下存在a.xls的文件，在单元格第2行第2列存在要读取的图片</p>
<p><code>//引用Excel命名空间</code><br />
<code>using Excel;//......</code></p>
<p><code>//下面从a.xls中的2,2格复制图片到剪贴板，然后从剪贴板读取图片并显示到pictureBox1中。</code></p>
<p><code>private void btnGetImageFromExcel_Click(object sender, EventArgs e)</code><br />
<code>{</code><br />
<code>//初始化excel对象</code><br />
<code>Excel.Application excel = new Excel.Application();</code></p>
<p><code>//打开xls文件（注意：后面的参数都用Type.Missing填充，表示使用参数的默认值）</code><br />
<code>excel.Workbooks.Open(@"C:\a.xls", System.Type.Missing, System.Type.Missing, System.Type.Missing, System.Type.Missing, System.Type.Missing, System.Type.Missing, System.Type.Missing, System.Type.Missing, System.Type.Missing, System.Type.Missing, System.Type.Missing, System.Type.Missing);</code></p>
<p><code>//选定到第2行第2列所在的单元格</code><br />
<code>Range r = (Range)excel.Cells[2, 2];</code><br />
<code>r.Select();</code></p>
<p><code>//将单元格复制到剪贴板中</code><br />
<code>r.CopyPicture(XlPictureAppearance.xlScreen, XlCopyPictureFormat.xlBitmap);</code></p>
<p><code>//退出excel</code><br />
<code>excel.Quit();</code></p>
<p><code>//判断剪贴板中是否存在图片，如果存在，则将图片显示到pictureBox1中</code><br />
<code>if (Clipboard.ContainsImage())</code><br />
<code>{</code><br />
<code>Image image=Clipboard.GetImage();</code><br />
<code>pictureBox1.Image = image;</code><br />
<code>}</code><br />
<code>}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rexis.cn/2007/08/03/net%e8%af%bb%e5%8f%96excel%e6%96%87%e4%bb%b6%e4%b8%ad%e7%9a%84%e5%9b%be%e7%89%87/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
