<?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>Alice and Bob in Cryptoland &#187; quivi</title>
	<atom:link href="http://alicebob.cryptoland.net/tag/quivi/feed/" rel="self" type="application/rss+xml" />
	<link>http://alicebob.cryptoland.net</link>
	<description></description>
	<lastBuildDate>Mon, 08 Mar 2010 00:28:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The black magic of GDI+</title>
		<link>http://alicebob.cryptoland.net/the-black-magic-of-gdi/</link>
		<comments>http://alicebob.cryptoland.net/the-black-magic-of-gdi/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 06:52:16 +0000</pubDate>
		<dc:creator>Conrado</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[cairo]]></category>
		<category><![CDATA[freeimage]]></category>
		<category><![CDATA[gdi]]></category>
		<category><![CDATA[pil]]></category>
		<category><![CDATA[quivi]]></category>

		<guid isPermaLink="false">http://alicebob.cryptoland.net/?p=188</guid>
		<description><![CDATA[One of the things I am most ashamed of on Quivi is its speed when opening large images (which are not uncommon nowadays, specially with digital photos). It&#8217;s embarrassing that the lame Windows Picture and Fax Viewer is lightning fast when opening those images!
I&#8217;ve always wondered how the Viewer did that. I&#8217;ve searched about it [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things I am most ashamed of on <a href="http://quivi.sourceforge.net/">Quivi</a> is its speed when opening large images (which are not uncommon nowadays, specially with digital photos). It&#8217;s embarrassing that the lame Windows Picture and Fax Viewer is lightning fast when opening those images!</p>
<p>I&#8217;ve always wondered how the Viewer did that. I&#8217;ve searched about it in the past but could never find anything about it. Then one of these days I was browsing the <a href="http://en.wikipedia.org/wiki/Windows_Picture_and_Fax_Viewer">Wikipedia page about the Viewer</a> and there I learned that it uses <a href="http://en.wikipedia.org/wiki/GDI%2B#GDI.2B">GDI+</a>.</p>
<p>GDI+ is a C++ library, but it is built upon <a href="http://msdn.microsoft.com/en-us/library/ms533969(VS.85).aspx">a flat C API</a> which I could easily use in Python via <a href="http://docs.python.org/library/ctypes.html">ctypes</a>. Long story short, I was able to modify Quivi to add support for viewing images with GDI+. And the result was amazing!</p>
<p>What about Linux? Well, something &#8220;equivalent&#8221; to GDI+ would be <a href="http://cairographics.org/">Cairo</a>, so I did some tests with it too (luckily, support for it was included in wxPython recently).</p>
<p>Here are the results for the time to load a huge 5704px x 5659px PNG image and rescale it to 1/20 of its size:</p>
<table class="booktabs">
<caption>Time to load and scale a PNG image</caption>
<thead>
<tr>
<th>Library</th>
<th>Time (s)</th>
</tr>
</thead>
<tbody>
<tr>
<td>FreeImage</td>
<td class="table-number">10.38</td>
</tr>
<tr>
<td>PIL</td>
<td class="table-number">9.90</td>
</tr>
<tr>
<td>GDI+</td>
<td class="table-number">2.22</td>
</tr>
<tr>
<td>Cairo (from FreeImage)</td>
<td class="table-number">3.60</td>
</tr>
<tr>
<td>Cairo (direct)</td>
<td class="table-number">3.28</td>
</tr>
</tbody>
</table>
<p>The reason for the two Cairo timings is that it supports reading directly from a PNG file but for e.g. JPG files you need to read the image with another library and to the format Cairo uses. I&#8217;ve used FreeImage to load the image and converted it to a Cairo surface.</p>
<p>Here are the results for the time to load and scaling the same image, but as a JPG:</p>
<table class="booktabs">
<caption>Time to load and scale a JPG image</caption>
<thead>
<tr>
<th>Library</th>
<th>Time (s)</th>
</tr>
</thead>
<tbody>
<tr>
<td>FreeImage</td>
<td class="table-number">6.91</td>
</tr>
<tr>
<td>PIL</td>
<td class="table-number">8.38</td>
</tr>
<tr>
<td>GDI+</td>
<td class="table-number">0.19</td>
</tr>
<tr>
<td>Cairo (from FreeImage)</td>
<td class="table-number">1.43</td>
</tr>
</tbody>
</table>
<p>Scary! How does GDI+ manages to do that? According to <a href="http://en.wikipedia.org/wiki/GDI%2B#GDI.2B">Wikipedia</a> it uses hardware acceleration&#8230; Cairo doesn&#8217;t lag begind considering that the scaling only takes 0.015 (!) but I did notice that even its best quality scaling isn&#8217;t so good in comparison to the others, which is kinda odd.</p>
<p>Anyway, I&#8217;ll try to release a new version of Quivi with GDI+ and Cairo support soon. Stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://alicebob.cryptoland.net/the-black-magic-of-gdi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quivi for Linux released</title>
		<link>http://alicebob.cryptoland.net/quivi-for-linux-released/</link>
		<comments>http://alicebob.cryptoland.net/quivi-for-linux-released/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 03:56:32 +0000</pubDate>
		<dc:creator>Conrado</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[quivi]]></category>

		<guid isPermaLink="false">http://alicebob.cryptoland.net/?p=143</guid>
		<description><![CDATA[I&#8217;ve just released the Linux version of Quivi:
Quivi is an image viewer (specialized for comic/manga reading) for Windows which supports many file formats and compressed (zip, rar) files. It is aimed for fast &#038; easy file browsing with keyboard or mouse. 
It was working on Linux for a while, but now it&#8217;s &#8220;official&#8221;. I&#8217;ve released [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just released the Linux version of <a href="http://quivi.sourceforge.net/">Quivi</a>:</p>
<blockquote><p>Quivi is an image viewer (specialized for comic/manga reading) for Windows which supports many file formats and compressed (zip, rar) files. It is aimed for fast &#038; easy file browsing with keyboard or mouse. </p></blockquote>
<p>It was working on Linux for a while, but now it&#8217;s &#8220;official&#8221;. I&#8217;ve released a .deb package which was tested on Ubuntu and may work on Debian. There&#8217;s also, of course, the source code, which requires some dependencies to be installed. You can grab both at the <a href="http://quivi.sourceforge.net/download.en.html">download page</a>.</p>
<p>Help on packaging is much welcome, since I don&#8217;t have any experience releasing stuff for Linux. And please tell me if there is anything wrong with the release.</p>
]]></content:encoded>
			<wfw:commentRss>http://alicebob.cryptoland.net/quivi-for-linux-released/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Quivi 1.0 released</title>
		<link>http://alicebob.cryptoland.net/quivi-10-released/</link>
		<comments>http://alicebob.cryptoland.net/quivi-10-released/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 01:40:09 +0000</pubDate>
		<dc:creator>Conrado</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[quivi]]></category>

		<guid isPermaLink="false">http://alicebob.cryptoland.net/?p=43</guid>
		<description><![CDATA[I&#8217;ve just released the new version of my image viewer and manga / comic reader, Quivi (only for Windows right now, but it will be ported to Linux and maybe to Mac). I&#8217;ve rewritten it from scratch, check my last post for more info.
The new features added were:

Prefetching of the next image
Wallpaper dialog
Start directory option

But [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just released the new version of my image viewer and manga / comic reader, <a href="http://quivi.sourceforge.net/">Quivi</a> (only for Windows right now, but it will be ported to Linux and maybe to Mac). I&#8217;ve rewritten it from scratch, check my <a href="http://alicebob.cryptoland.net/why-i-rewrote-quivi-from-scratch/en/">last post</a> for more info.</p>
<p>The new features added were:</p>
<ul>
<li>Prefetching of the next image</li>
<li>Wallpaper dialog</li>
<li>Start directory option</li>
</ul>
<p>But that is only the beginning; now it will be much more easy for me to work on Quivi.</p>
<p>There are many comic readers around; like <a href="http://www.geocities.com/davidayton/CDisplay">CDisplay</a> (outdated, but very popular), <a href="http://comical.sourceforge.net/">Comical</a> and <a href="http://comix.sourceforge.net/">Comix</a>. They have much more features than Quivi, and I must admit that I often thought on giving up on Quivi. But I just couldn&#8217;t.</p>
<p>I wrote it mainly for myself; when I started there was only CDisplay. The first version was written with Visual Basic (go on, laugh). Then I changed to C++. And now I changed to Python, and I hope this is the last language change :) It&#8217;s a hobby project that I grew to love. It suits my needs, but I&#8217;d really like to suit the needs of other people too! </p>
<p>It is scary when you realize that people are using your software. I feel responsible; wherever I find someone <a href="http://hirvine.com/blog/1546/quivi-manga-reading-tool/">criticizing it</a>, I feel guilty for not attending those people needs. Yes, that&#8217;s stupid, but it&#8217;s how I am. At the same time, though, it&#8217;s awesome to know that there are people who like it and find it useful.</p>
<p>If you have <strong>any</strong> suggestion, comment, complain about Quivi, please send it to me!</p>
]]></content:encoded>
			<wfw:commentRss>http://alicebob.cryptoland.net/quivi-10-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Porque eu reescrevi o Quivi do zero</title>
		<link>http://alicebob.cryptoland.net/porque-eu-reescrevi-o-quivi-do-zero/</link>
		<comments>http://alicebob.cryptoland.net/porque-eu-reescrevi-o-quivi-do-zero/#comments</comments>
		<pubDate>Sun, 21 Sep 2008 19:23:41 +0000</pubDate>
		<dc:creator>Conrado</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[quivi]]></category>
		<category><![CDATA[wxpython]]></category>

		<guid isPermaLink="false">http://alicebob.cryptoland.net/?p=40</guid>
		<description><![CDATA[Joel Spolsky, programador conhecido, disse em seu blog:
(&#8230;) Eles [da Netscape] fizeram isso tomando a pior decisão estratégica que uma compania de software pode fazer:
Eles decidiram reescrever o código do zero.
Em concordo, a princípio. Muitos projetos anunciam que foram &#8220;reescritos do zero&#8221; como se isso fosse algo maravilhoso, e na maioria das vezes, é só [...]]]></description>
			<content:encoded><![CDATA[<p>Joel Spolsky, programador conhecido, <a href="http://www.joelonsoftware.com/articles/fog0000000069.html">disse</a> em seu <a href="http://www.joelonsoftware.com/">blog</a>:</p>
<blockquote><p>(&#8230;) Eles [da Netscape] fizeram isso tomando a pior decisão estratégica que uma compania de software pode fazer:</p>
<p>Eles decidiram reescrever o código do zero.</p></blockquote>
<p>Em concordo, a princípio. Muitos projetos anunciam que foram &#8220;reescritos do zero&#8221; como se isso fosse algo maravilhoso, e na maioria das vezes, é só um sinal que a nova versão provavelmente tem mais bugs que a anterior.</p>
<p>Mas peraí, eu acabei de reescrever o <a href="http://quivi.sourceforge.net/">Quivi</a> (um visualizador de imagens e leitor de HQ&#8217;s / mangás) do zero! Por quê, então?</p>
<p>Bom, pensei que seria necessário me justificar. Essas são as razões:</p>
<ul>
<li>É um projeto pequeno. Reescrevê-lo com certeza não é tão difícil quanto reescrever um navegador!</li>
<li>Eu não aguentava mais C++ (a linguagem de programação que eu utilizava). Claro, isso não é exatamente culpa do C++. Ele tem seus usos &mdash; a ferramente certa para o trabalho certo, e tudo o mais. Mas para escrever um programa de desktop? É canhão para matar formiga. Se você consegue (e gosta!) de fazer isso, eu admiro você. Mas eu não tinha mais motivação para trabalhar no Quivi.</li>
<li>Eu adoro Python (a linguagem de programação que eu uso agora), e claro,<br />
<a href="http://xkcd.com/353/">não sou o único</a>. Programar é divertido em Python, tanto que eu tive a motivação de reescrever tudo, para começo de conversa! E claro, agora vai ser muito mais fácil para eu continuar trabalhando no Quivi.</li>
<li>Eu podia mudar de bibilioteca de interface. O <a href="http://smartwin.sourceforge.net/">SmartWin</a> é uma boa bibilioteca, e use templates de formas interessantes; enquanto eu programava o Quivi eu acabei participando do desenvolvimento do SmartWin também. Mas ele tem os seus bugs, e justamente <em>porque</em> ele usa templates extensivamente, compilar um programa que o utilize é <strong>lento demais</strong>. Eu mudei para o <a href="http://wxpython.org/">wxPython</a>, que é uma biblioteca de interface muito madura &mdash; e multi plataforma ainda por cima.</li>
</ul>
<p>Claro, existem algumas desvantagens com a mudança. O pacote inteiro é muito maior devido às dependências (o instalador foi de 900K para 5MB!). E o programa é um pouco mais lento, principalmente na inicialização, e usa mais memória (9MB para 30MB com nenhum imagem aberta). Mas eu acredito que foi um bom compromisso.</p>
<p>Reescrever do zero deve ser estudado com cuidado, e neste caso, acredito que foi uma boa idéia. O Quivi é um hobby, e acho que o ponto principal é me divertir escrevendo ele, e atender às necessidades dos usuários. Espero que eu consiga fazer os dois com esta nova versão (que será lançada em breve).</p>
]]></content:encoded>
			<wfw:commentRss>http://alicebob.cryptoland.net/porque-eu-reescrevi-o-quivi-do-zero/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why I rewrote Quivi from scratch</title>
		<link>http://alicebob.cryptoland.net/why-i-rewrote-quivi-from-scratch/</link>
		<comments>http://alicebob.cryptoland.net/why-i-rewrote-quivi-from-scratch/#comments</comments>
		<pubDate>Sun, 21 Sep 2008 02:31:39 +0000</pubDate>
		<dc:creator>Conrado</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[quivi]]></category>
		<category><![CDATA[wxpython]]></category>

		<guid isPermaLink="false">http://alicebob.cryptoland.net/?p=35</guid>
		<description><![CDATA[Joel Spolsky, popular software engineering, said in this blog:
(&#8230;) They [Netscape] did it by making the single worst strategic mistake that any software company can make:
They decided to rewrite the code from scratch.
I agree, mostly. Many projects market that they&#8217;ve been &#8220;rewritten from scratch&#8221; as if it was something marvelous, and most of time, it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Joel Spolsky, popular software engineering, <a href="http://www.joelonsoftware.com/articles/fog0000000069.html">said</a> in this <a href="http://www.joelonsoftware.com/">blog</a>:</p>
<blockquote><p>(&#8230;) They [Netscape] did it by making the single worst strategic mistake that any software company can make:</p>
<p>They decided to rewrite the code from scratch.</p></blockquote>
<p>I agree, mostly. Many projects market that they&#8217;ve been &#8220;rewritten from scratch&#8221; as if it was something marvelous, and most of time, it&#8217;s just a sign that the new version probably has more bugs than the previous. But, wait, I just rewrote <a href="http://quivi.sourceforge.net/">Quivi</a> (a image viewer and comic / manga reader) from scratch! Well, why?</p>
<p>Well, I thought I really had to justify this. So here are the reasons:</p>
<ul>
<li>It is a small project. Rewriting it certainly isn&#8217;t as hard as rewriting a browser!</li>
<li>I couldn&#8217;t stand C++ anymore (the programming language I used before). Of course, this isn&#8217;t C++ fault <em>per se</em>. It has its uses &mdash; the right tool for the right job, and so on. But to write an desktop application? It&#8217;s overkill. If you manage to pull it of, hey, kudos to you. But I had no motivation to work on it anymore.</li>
<li>I love Python (the programming language I use now), and of course, I&#8217;m <a href="http://xkcd.com/353/">not the only one</a>. Programming is <strong>fun</strong> in Python, so much that had the motivation to rewrite Quivi from scratch in the first place! And of course, it will be much more easier for me to keep working on Quivi.</li>
<li>I could change GUI libraries. <a href="http://smartwin.sourceforge.net/">SmartWin</a> is a nice library, and uses templates in very interesting ways; when programming Quivi I ended up involved with its development too. But it has its bugs, and <em>because</em> it uses templates extensively, it&#8217;s awful <strong>slow</strong> to compile an application that uses it. I&#8217;ve changed to <a href="http://wxpython.org/">wxPython</a>, which is a very mature GUI library &#8211; and cross platform to boot.</li>
</ul>
<p>Of course, there are some downsides with the change. The whole software package is much bigger due to the dependencies (the installer jumped from 900K to 5MB!). And the program is a little bit slower, mainly when starting up, and uses more memory (9MB to 30MB with no images loaded). But I think it was a good enough trade-off.</p>
<p>Rewriting from scratch must be considered carefully, and in this case, I think it was a good idea. Quivi is a hobby project, and I guess the main point of it is to have fun writing it, and to make users happy. I hope I can do both with this new version (which will be released soon).</p>
]]></content:encoded>
			<wfw:commentRss>http://alicebob.cryptoland.net/why-i-rewrote-quivi-from-scratch/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
