<?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>thorx.net &#187; image</title>
	<atom:link href="http://blog.thorx.net/tag/image/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.thorx.net</link>
	<description>...to confuse &#38; unexpect‽</description>
	<lastBuildDate>Tue, 31 Mar 2020 12:54:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6.1</generator>
		<item>
		<title>Grids. A story of 2001.</title>
		<link>http://blog.thorx.net/2014/03/grids-a-story-of-2001/</link>
		<comments>http://blog.thorx.net/2014/03/grids-a-story-of-2001/#comments</comments>
		<pubDate>Tue, 18 Mar 2014 10:32:20 +0000</pubDate>
		<dc:creator>nemo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[culture]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[image]]></category>

		<guid isPermaLink="false">http://blog.thorx.net/?p=422</guid>
		<description><![CDATA[Back in 2000, a favourite geek/fan past time was Star Wars vs Star Trek. Who would win between the Enterprise-D and a Star Destroyer, and that kind of thing. I eschewed that in favour of pure size comparisons. (there is no other kind of dick waving contest, right? And created multiple images to handle multiple [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Back in 2000, a favourite geek/fan past time was Star Wars vs Star Trek. Who would win between the Enterprise-D and a Star Destroyer, and that kind of thing. </p>
<p>I eschewed that in favour of pure size comparisons. (there is no other kind of dick waving contest, right? <img src='http://blog.thorx.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  And created multiple images to handle multiple scales smoothly (something that many modern implementations of this idea, which whilst better in every other way, often fail to handle well). </p>
<p>My project faltered, in part from interest waning, and in part from difficulty in sourcing images and information in the 2001 internet.</p>
<p>However, I&#8217;ve dug up what I did, and presenting it for the first time in years&#8230; </p>
<p>Sci-Fi &#8220;Grids&#8221;</p>
<p>http://sta.sh/21qzlqpf2j29</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thorx.net/2014/03/grids-a-story-of-2001/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multi quality JPEG hack</title>
		<link>http://blog.thorx.net/2011/07/multi-quality-jpeg-hack/</link>
		<comments>http://blog.thorx.net/2011/07/multi-quality-jpeg-hack/#comments</comments>
		<pubDate>Sat, 30 Jul 2011 05:55:50 +0000</pubDate>
		<dc:creator>nemo</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[computer]]></category>
		<category><![CDATA[experiments]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[image]]></category>

		<guid isPermaLink="false">http://blog.thorx.net/?p=284</guid>
		<description><![CDATA[tl;dr: In which I attempt to montage jpeg which comprises areas of differing internal jpeg quality, for fun and, er&#8230; artistic geeky interest. You see, once upon a time, I was thinking about lossless jpeg editing. The sort that jpegtran can do. jpegtran (1) - lossless transformation of JPEG files Specifically, jpegtran can (with some [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><strong>tl;dr:</strong> In which I attempt to montage jpeg which comprises areas of differing <strong>internal jpeg quality</strong>, for fun and, er&#8230;<span style="text-decoration: line-through;"> artistic</span> geeky interest.<br />
<span id="more-284"></span>You see, once upon a time, I was thinking about lossless jpeg editing. The sort that jpegtran can do.</p>
<pre>jpegtran (1)         - lossless transformation of JPEG files</pre>
<p>Specifically, jpegtran can (with some understandable limits) rotate/flip and mirror losslessly, and also crop &#8211; for values of &#8220;lossless&#8221; that only apply to the cropped image data.</p>
<p>I soon got to wondering if the reverse could also be true. If jpeg image data can be cropped losslessly; then it must not rely on surrounding data and so surely paste is equally possible.</p>
<p>I researched some and found&#8230; <a href="http://www.imagemagick.org/Usage/formats/#jpg_lossless">http://www.imagemagick.org/Usage/formats/#jpg_lossless</a>. If you scroll down to the &#8216;Mixed JPEG Quality&#8217; section it&#8217;s suggested:</p>
<blockquote><p>* use jpegtran to merge the q60 on top of the q100</p></blockquote>
<p>&#8220;So&#8221;, I thinks to myself, &#8220;&#8230;jpegtran can do that, huh?&#8221;</p>
<p>Turns out that it can&#8217;t. Not the version currently in Debian anyway.</p>
<p>&#8230;But an experimental version can. See the version that the chaps have here: <a href="http://jpegclub.org/jpegtran/">http://jpegclub.org/jpegtran/</a></p>
<div id="attachment_285" class="wp-caption alignleft" style="width: 310px"><a rel="attachment wp-att-285" href="http://blog.thorx.net/2011/07/multi-quality-jpeg-hack/kwalitee/"><img class="size-medium wp-image-285" title="kwalitee" src="http://blog.thorx.net/wp-uploads/2011/06/kwalitee-300x192.jpg" alt="Multi Quality JPEG" width="300" height="192" /></a><p class="wp-caption-text">Only the original 1600x1024 is a true quality hybrid</p></div>
<p>The information on that page indicates to me that the &#8216;drop&#8217; option has been experimental since 2000 at least&#8230; and I wonder why it&#8217;s not mainstream then. But, let&#8217;s take a look anyway. There are helpful binaries and a sample script provided, but I had something a bit more fun in mind.</p>
<p>One download later, and some fiddling around&#8230; and here is this! IMAG KWALITEE for all!</p>
<p>Counting from the bottom where it&#8217;s most evident, the rows of 80 pixels high each are of quality 1, 4, 5, 6, 7, 8, 9, 10, 15, 20, 50, and the final 144 pixels at the top are original (ie, camera sourced jpeg with text composited in and saved at quality 100).</p>
<p>The resulting image is 153k in size. In this example, a normal save of the source (captioned) image at a quality of 72 results in an image of equivalent size.</p>
<p>Speaking of size, since the cropped rows exist as images on their own, I can also see how much space each quality section uses.  So the  q1 row (80pixels high &#8211; or about 8% of the final image) is just a tad  over 3k in size &#8211; that is, about 2% of the bytes, and even the quality 50  stripe is only 8k &#8211; 5.5% of the bytes. However, the q100 stripe at the  top &#8211; 144 pixels comprising 14% of the pixel space, and is a whopping 66% of  the bytes!</p>
<p>In another example image, I discovered that you cannot drop a  colour segment onto a greyscale image (but you CAN drop a greyscale  segment onto a colour image, and then subsequently drop a colour segment  within the greyscale. The resulting possum is shown, but I wont go into the making-of here.</p>
<h3>Additional notes</h3>
<p>In creating this, I found a few caveats&#8230;</p>
<div id="attachment_296" class="wp-caption alignright" style="width: 310px"><a rel="attachment wp-att-296" href="http://blog.thorx.net/2011/07/multi-quality-jpeg-hack/possum_final/"><img class="size-medium wp-image-296" title="Possum with border" src="http://blog.thorx.net/wp-uploads/2011/06/possum_final-300x200.jpg" alt="Jpeg multi-quality hack of a possum " width="300" height="200" /></a><p class="wp-caption-text">This tree is terrible! It has a monotone border bits AND bad compression</p></div>
<ul>
<li> Make sure the crops and drops are aligned on the jpeg iMCU  boundaries, or headaches ensue since the crop size will be silently  altered in position (as, I think, is the drop). I made all my changes on  the boundary of 16&#215;16 blocks, though 8&#215;8 is also possible (I believe this may depend on  the jpeg)</li>
<li> I had to set the caption text to a light grey after I found that pure white  would cause jpeg errors when dropping (DCT coefficient out of range). I  don&#8217;t know if this is a bug, or just a limitation in what&#8217;s possible due  to jpeg encoding.</li>
<li> A colour jpeg loses it&#8217;s colour when dropped onto a greyscale jpeg. Specifically:
<ol>
<li> crop &#8216;cropped.jpg&#8217; from colour source.jpg</li>
<li> also create greyscale.jpg from source.jpg</li>
<li> drop &#8216;cropped.jpg&#8217; back onto the original location within greyscale.jpg to create merged.jpg</li>
<li> merged.jpg is not a grey-with-colour-segment jpeg, but is all grey. in fact, it&#8217;s so grey that merged.jpg and greyscale.jpg are binary identical!</li>
</ol>
<ul>
<li> note: tested just once :)</li>
</ul>
</li>
<li> real-world practical applications of this? <a href="http://www.photopla.net/wwp0703/stripes.php">http://www.photopla.net/wwp0703/stripes.php</a> &#8230;that&#8217;s probably about it. Any stylistic effect from this is likely achievable with less effort via a standard photo editor (The GIMP, etc) with the cost of a few % in filesize when saving at a high enough quality to ensure actual jpeg artifacts don&#8217;t spoil the effect.</li>
</ul>
<p>This page is derived from my wiki notes on the subject, which include additional information/updates for the inquisitive.</p>
<p>See: <a href="http://wiki.thorx.net/wiki/JPEGhack">http://wiki.thorx.net/wiki/JPEGhack</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thorx.net/2011/07/multi-quality-jpeg-hack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
