<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-16626959</id><updated>2024-08-29T12:45:00.457-07:00</updated><category term="Python"/><category term="파이썬"/><category term="Hello World"/><category term="idat"/><category term="java"/><category term="mobile"/><category term="ngb"/><category term="png"/><category term="skt"/><category term="skvm"/><category term="wap"/><category term="wipi"/><category term="모바일"/><category term="안녕"/><category term="에러"/><category term="자바"/><title type='text'>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='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16626959/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://newkain.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.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='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjPL8kcke8xeE2ViXI3HtAQffkzCZcItN9rKWpT3tUpCj0neYWqOx9jUfS0p6XrQgetfMvvElbmnlO6UjBSfzawCWMiP16wK4ljFWC_8NRs4M7S8HtFpIVKap1E49zrg/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><entry><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><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 type='text'>[Java] Hello World</title><content type='html'>Java First Program

&lt;pre class=&quot;brush: java;&quot;&gt;
public class HelloWorld
{
 public static void main(String[] args)
 {
   System.out.println(&quot;Hello World&quot;);
 }
}
&lt;/pre&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/fullpage/post/16626959/9077321852394034187' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16626959/posts/default/9077321852394034187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16626959/posts/default/9077321852394034187'/><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='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjPL8kcke8xeE2ViXI3HtAQffkzCZcItN9rKWpT3tUpCj0neYWqOx9jUfS0p6XrQgetfMvvElbmnlO6UjBSfzawCWMiP16wK4ljFWC_8NRs4M7S8HtFpIVKap1E49zrg/s220/p081127_002_pure0927.jpg'/></author><thr:total>0</thr:total></entry><entry><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><category scheme="http://www.blogger.com/atom/ns#" term="idat"/><category scheme="http://www.blogger.com/atom/ns#" term="mobile"/><category scheme="http://www.blogger.com/atom/ns#" term="ngb"/><category scheme="http://www.blogger.com/atom/ns#" term="png"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="skt"/><category scheme="http://www.blogger.com/atom/ns#" term="skvm"/><category scheme="http://www.blogger.com/atom/ns#" term="wap"/><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="에러"/><category scheme="http://www.blogger.com/atom/ns#" term="파이썬"/><title type='text'>[Python] 모바일용 PNG 검사</title><content type='html'>&lt;span style=&quot;font-family:courier new;&quot;&gt;

국내 이통사의 모바일폰 서비스에 PNG 이미지를 사용한다.
KTF, LGT는 큰 문제가 없지만 SKT 일부 폰에서 PNG 이미지 출력에 문제가 있다.

&lt;span style=&quot;font-weight: bold;&quot;&gt;원인은 PNG 내부의 IDAT 헤더가 2개 이상인 경우 발생한다.&lt;/span&gt;

이에 PNG 내부의 &lt;a href=&quot;http://entropymine.com/jason/tweakpng/&quot;&gt;IDAT 헤더를 1개로 줄여주는 프로그램&lt;/a&gt;을 사용하면 문제는 해결된다.

그러나 이미지가 수십개 수백개 이상되는데 일일이 열어서 확인할 수 없어
Python으로 간단하게 코드를 만들어봤다.

&lt;/span&gt;

&lt;pre name=&quot;code&quot; class=&quot;python&quot;&gt;
# -*- coding: cp949 -*-
import os

for root, dirs, files in os.walk(r&quot;C:\temp&quot;):
    for png_file in files:
        if png_file.find(&quot;.png&quot;) &gt; -1:
            print &quot;check file : &quot; + png_file
            try:
                #rb로 열어야 한다.
                fp = open(root + &quot;\\&quot; + png_file, &quot;rb&quot;)
                png_data = fp.read()
                if png_data.count(&quot;IDAT&quot;) &gt;= 2:
                    print &quot;&gt; find IDAT 2 MORE png : &quot; + png_file
                else:
                    print &quot;&gt; mobile ok&quot; + png_file
            finally:
                if fp != None:
                    fp.close()
                fp = None
                png_data = None
        else:
            print &quot;not png file : &quot; + png_file
&lt;/pre&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/fullpage/post/16626959/5291912203956419263' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16626959/posts/default/5291912203956419263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16626959/posts/default/5291912203956419263'/><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='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjPL8kcke8xeE2ViXI3HtAQffkzCZcItN9rKWpT3tUpCj0neYWqOx9jUfS0p6XrQgetfMvvElbmnlO6UjBSfzawCWMiP16wK4ljFWC_8NRs4M7S8HtFpIVKap1E49zrg/s220/p081127_002_pure0927.jpg'/></author><thr:total>0</thr:total></entry><entry><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><category scheme="http://www.blogger.com/atom/ns#" term="Hello World"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="파이썬"/><title type='text'>[Python] Hello World</title><content type='html'>&lt;pre name=&quot;code&quot; class=&quot;python&quot;&gt;
print &#39;Hello World&#39;
&lt;/pre&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/fullpage/post/16626959/791310713051905889' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16626959/posts/default/791310713051905889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16626959/posts/default/791310713051905889'/><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='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjPL8kcke8xeE2ViXI3HtAQffkzCZcItN9rKWpT3tUpCj0neYWqOx9jUfS0p6XrQgetfMvvElbmnlO6UjBSfzawCWMiP16wK4ljFWC_8NRs4M7S8HtFpIVKap1E49zrg/s220/p081127_002_pure0927.jpg'/></author><thr:total>0</thr:total></entry></feed>