<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" gd:etag="W/&quot;D08CQHc9eyp7ImA9WhRRFE4.&quot;"><id>tag:blogger.com,1999:blog-16626959</id><updated>2011-11-27T15:17:41.963-08:00</updated><category term="mobile" /><category term="Python" /><category term="안녕" /><category term="idat" /><category term="모바일" /><category term="자바" /><category term="java" /><category term="skvm" /><category term="파이썬" /><category term="에러" /><category term="skt" /><category term="ngb" /><category term="wipi" /><category term="png" /><category term="wap" /><category term="Hello World" /><title>Code Inside</title><subtitle type="html">programming language, api, sample code</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://newkain.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://newkain.blogspot.com/" /><author><name>떵꺼리</name><uri>http://www.blogger.com/profile/01337163475261065217</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_V3cCh5Jvr9E/SgzPbpIOtaI/AAAAAAAAA3M/bFnYYYPoSF4/S220/p081127_002_pure0927.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/oLpN" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="blogspot/olpn" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;AkEBQng_cSp7ImA9WxJXFkQ.&quot;"><id>tag:blogger.com,1999:blog-16626959.post-9077321852394034187</id><published>2009-06-10T18:22:00.000-07:00</published><updated>2009-06-10T22:37:33.649-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-10T22:37:33.649-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="안녕" /><category scheme="http://www.blogger.com/atom/ns#" term="자바" /><title>[Java] Hello World</title><content type="html">Java First Program

&lt;pre class="brush: java;"&gt;
public class HelloWorld
{
 public static void main(String[] args)
 {
   System.out.println("Hello World");
 }
}
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16626959-9077321852394034187?l=newkain.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://newkain.blogspot.com/feeds/9077321852394034187/comments/default" title="댓글" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=16626959&amp;postID=9077321852394034187" title="0개의 덧글" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/16626959/posts/default/9077321852394034187?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/16626959/posts/default/9077321852394034187?v=2" /><link rel="alternate" type="text/html" href="http://newkain.blogspot.com/2009/06/public-class-helloworld-public-static.html" title="[Java] Hello World" /><author><name>떵꺼리</name><uri>http://www.blogger.com/profile/01337163475261065217</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_V3cCh5Jvr9E/SgzPbpIOtaI/AAAAAAAAA3M/bFnYYYPoSF4/S220/p081127_002_pure0927.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;AkMDQX8-cSp7ImA9WxJXFkU.&quot;"><id>tag:blogger.com,1999:blog-16626959.post-5291912203956419263</id><published>2009-06-09T22:49:00.000-07:00</published><updated>2009-06-10T19:47:50.159-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-10T19:47:50.159-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="png" /><category scheme="http://www.blogger.com/atom/ns#" term="mobile" /><category scheme="http://www.blogger.com/atom/ns#" term="skvm" /><category scheme="http://www.blogger.com/atom/ns#" term="모바일" /><category scheme="http://www.blogger.com/atom/ns#" term="idat" /><category scheme="http://www.blogger.com/atom/ns#" term="파이썬" /><category scheme="http://www.blogger.com/atom/ns#" term="wap" /><category scheme="http://www.blogger.com/atom/ns#" term="skt" /><category scheme="http://www.blogger.com/atom/ns#" term="wipi" /><category scheme="http://www.blogger.com/atom/ns#" term="에러" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><category scheme="http://www.blogger.com/atom/ns#" term="ngb" /><title>[Python] 모바일용 PNG 검사</title><content type="html">&lt;span style="font-family:courier new;"&gt;

국내 이통사의 모바일폰 서비스에 PNG 이미지를 사용한다.
KTF, LGT는 큰 문제가 없지만 SKT 일부 폰에서 PNG 이미지 출력에 문제가 있다.

&lt;span style="font-weight: bold;"&gt;원인은 PNG 내부의 IDAT 헤더가 2개 이상인 경우 발생한다.&lt;/span&gt;

이에 PNG 내부의 &lt;a href="http://entropymine.com/jason/tweakpng/"&gt;IDAT 헤더를 1개로 줄여주는 프로그램&lt;/a&gt;을 사용하면 문제는 해결된다.

그러나 이미지가 수십개 수백개 이상되는데 일일이 열어서 확인할 수 없어
Python으로 간단하게 코드를 만들어봤다.

&lt;/span&gt;

&lt;pre name="code" class="python"&gt;
# -*- coding: cp949 -*-
import os

for root, dirs, files in os.walk(r"C:\temp"):
    for png_file in files:
        if png_file.find(".png") &gt; -1:
            print "check file : " + png_file
            try:
                #rb로 열어야 한다.
                fp = open(root + "\\" + png_file, "rb")
                png_data = fp.read()
                if png_data.count("IDAT") &gt;= 2:
                    print "&gt; find IDAT 2 MORE png : " + png_file
                else:
                    print "&gt; mobile ok" + png_file
            finally:
                if fp != None:
                    fp.close()
                fp = None
                png_data = None
        else:
            print "not png file : " + png_file
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16626959-5291912203956419263?l=newkain.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://newkain.blogspot.com/feeds/5291912203956419263/comments/default" title="댓글" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=16626959&amp;postID=5291912203956419263" title="0개의 덧글" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/16626959/posts/default/5291912203956419263?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/16626959/posts/default/5291912203956419263?v=2" /><link rel="alternate" type="text/html" href="http://newkain.blogspot.com/2009/06/python-png.html" title="[Python] 모바일용 PNG 검사" /><author><name>떵꺼리</name><uri>http://www.blogger.com/profile/01337163475261065217</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_V3cCh5Jvr9E/SgzPbpIOtaI/AAAAAAAAA3M/bFnYYYPoSF4/S220/p081127_002_pure0927.jpg" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;AkEERnc5eSp7ImA9WxJXFkU.&quot;"><id>tag:blogger.com,1999:blog-16626959.post-791310713051905889</id><published>2009-05-19T18:42:00.000-07:00</published><updated>2009-06-10T19:50:07.921-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-10T19:50:07.921-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="파이썬" /><category scheme="http://www.blogger.com/atom/ns#" term="Hello World" /><category scheme="http://www.blogger.com/atom/ns#" term="Python" /><title>[Python] Hello World</title><content type="html">&lt;pre name="code" class="python"&gt;
print 'Hello World'
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16626959-791310713051905889?l=newkain.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://newkain.blogspot.com/feeds/791310713051905889/comments/default" title="댓글" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=16626959&amp;postID=791310713051905889" title="0개의 덧글" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/16626959/posts/default/791310713051905889?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/16626959/posts/default/791310713051905889?v=2" /><link rel="alternate" type="text/html" href="http://newkain.blogspot.com/2009/05/python-hello-world.html" title="[Python] Hello World" /><author><name>떵꺼리</name><uri>http://www.blogger.com/profile/01337163475261065217</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://3.bp.blogspot.com/_V3cCh5Jvr9E/SgzPbpIOtaI/AAAAAAAAA3M/bFnYYYPoSF4/S220/p081127_002_pure0927.jpg" /></author><thr:total>0</thr:total></entry></feed>

