<?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>images &#8211; Avian Bone Syndrome</title>
	<atom:link href="https://www.avianbonesyndrome.com/tag/images/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.avianbonesyndrome.com</link>
	<description>An exercise in futility by Daniele Nicolucci</description>
	<lastBuildDate>Tue, 07 Sep 2010 14:42:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.avianbonesyndrome.com/wp-content/uploads/2015/04/cropped-cover-sito-32x32.jpg</url>
	<title>images &#8211; Avian Bone Syndrome</title>
	<link>https://www.avianbonesyndrome.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">12285558</site>	<item>
		<title>Fix broken IMAP attachments in Mail.app</title>
		<link>https://www.avianbonesyndrome.com/2010/09/07/fix-broken-imap-attachments-in-mail-app/</link>
		
		<dc:creator><![CDATA[Daniele Nicolucci]]></dc:creator>
		<pubDate>Tue, 07 Sep 2010 09:32:51 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[attachments]]></category>
		<category><![CDATA[broken]]></category>
		<category><![CDATA[corrupted]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mail.app]]></category>
		<category><![CDATA[tutorial]]></category>
		<guid isPermaLink="false">http://www.avianbonesyndrome.com/?p=369</guid>

					<description><![CDATA[I have recently started getting broken images in Mail.app. Often, when someone sent me relatively big pictures (over 1 MB in size), the image ended up being corrupted, with a smaller file size that one would expect. This results in a picture that&#8217;s visible up to a certain point, and then rest is usually filled with solid grey by the viewer. While this could happen because the attached image is indeed broken — that is, if the sender is attaching an image that&#8217;s already corrupted on his/her machine —, it&#8217;s unlikely that the file gets mangled during the transit. To begin with, the base64 encoding adds lots of CRC (1/3 of the file size, and this alone explains why it&#8217;s a very bad idea to send big files through e-mail). In addition to that, no MTA will accept a malformed message: MIME parts must be completed with an extra boundary&#8230;]]></description>
										<content:encoded><![CDATA[<p>I have recently started getting broken images in Mail.app. Often, when someone sent me relatively big pictures (over 1 MB in size), the image ended up being corrupted, with a smaller file size that one would expect. This results in a picture that&#8217;s visible up to a certain point, and then rest is usually filled with solid grey by the viewer.</p>
<p>While this could happen because the attached image is indeed broken — that is, if the sender is attaching an image that&#8217;s already corrupted on his/her machine —, it&#8217;s unlikely that the file gets mangled during the transit. To begin with, the base64 encoding adds lots of CRC (1/3 of the file size, and this alone explains why it&#8217;s a very bad idea to send big files through e-mail). In addition to that, no MTA will accept a malformed message: MIME parts must be completed with an extra boundary marker, and the infamous dot on its own line has to be there to commit the DATA part. Using a webmail system makes it even more difficult to corrupt a file in transit, because there is the extra uploading step that ensures that the attachment reaches the server <em>before</em> the message is constructed and finally sent.</p>
<p>If none of this makes sense and you want to know more, please refer to <a href="http://tools.ietf.org/html/rfc2821">RFC 2821</a>, but the point is that it&#8217;s virtually impossible for several people to send corrupted images. It&#8217;s way more likely that the problem lies within the recipient&#8217;s client.</p>
<p>With OS X&#8217;s Mail.app, these problems happen when there is some communication failure during the download of the message. Essentially, if the download gets interrupted for any reason, Mail.app may be unable to notice and will be perfectly happy with the broken file. There are two ways to fix this:</p>
<ul>
<li>The hard way: go to ~/Library/Mail, and for each INBOX you may have, delete anything inside the Attachment folder</li>
<li>The easy way: select your Inbox folder within Mail.app and simply run Mailbox → Rebuild</li>
</ul>
<p>That should take care of the problem. Note that the Rebuild procedure will redownload every message from the server again with all the attachments, essentially resynchronizeing the local cache with whatever is on the server, fixing any discrepancies. It may take some time, but you can keep an eye on the progress by opening the Activity window (Window → Activity, or ⌘0.)</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">369</post-id>	</item>
		<item>
		<title>Batch-converting images for an HDTV</title>
		<link>https://www.avianbonesyndrome.com/2010/04/12/batch-converting-images-for-an-hdtv/</link>
					<comments>https://www.avianbonesyndrome.com/2010/04/12/batch-converting-images-for-an-hdtv/#comments</comments>
		
		<dc:creator><![CDATA[Daniele Nicolucci]]></dc:creator>
		<pubDate>Mon, 12 Apr 2010 08:47:19 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[cp]]></category>
		<category><![CDATA[flash drive]]></category>
		<category><![CDATA[hdtv]]></category>
		<category><![CDATA[imagemagick]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[iphoto]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[pictures]]></category>
		<category><![CDATA[resizing]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[usb]]></category>
		<guid isPermaLink="false">http://www.avianbonesyndrome.com/?p=23</guid>

					<description><![CDATA[A couple of days ago, my parents bought their first HDTV. Since it has a USB port that can be used to show pictures stored on a flash drive, I found myself in the position of finally using an old 512 MB stick I had lying around. I scouted my iPhoto Libraries for pictures, and simply dragged them into a folder I had created. I quickly stumbled across two problems: The Finder almost immediately reported that the drive was full, even when it still had over 350 MB available, or that one or more files couldn&#8217;t &#8220;be read or written&#8221;; 8-megapixel images are just too big for a Full HD screen, so you end up wasting a lot of space and possibly slowing down the TV. Did I fix them? You bet I did. Read on to find how. The first problem was the trickiest to solve. After trying to&#8230;]]></description>
										<content:encoded><![CDATA[<p>A couple of days ago, my parents bought their first HDTV. Since it has a USB port that can be used to show pictures stored on a flash drive, I found myself in the position of finally using an old 512 MB stick I had lying around.</p>
<p>I scouted my iPhoto Libraries for pictures, and simply dragged them into a folder I had created. I quickly stumbled across two problems:</p>
<ol>
<li>The Finder almost immediately reported that the drive was full, even when it still had over 350 MB available, or that one or more files couldn&#8217;t &#8220;be read or written&#8221;;</li>
<li>8-megapixel images are just too big for a Full HD screen, so you end up wasting a lot of space and possibly slowing down the TV.</li>
</ol>
<p>Did I fix them? You bet I did. Read on to find how.</p>
<p><span id="more-23"></span>The first problem was the trickiest to solve. After trying to copy it directly using <code>cp</code> in a shell, and getting the same error, I decided to try copying the files without their resource forks. To do that, use the <code>-X</code> flag on <code>cp</code>. It magically worked, even though I&#8217;m not sure what the problem was, but using <code>cp -X</code> gives you the clean, data fork only images, and everything is merry again.</p>
<p>The second problem is more of an hassle, but going from 182 MiB to 63 MB (for 167 images) is certainly nice. After all, the output screen only has a resolution of 1920 x 1080 pixels, and it&#8217;s absolutely pointless to use it to display images sized up to 3456 x 2304 pixels.</p>
<p>So, how do you resize them in a pinch? Enter <a href="http://www.imagemagick.org/">ImageMagick</a>, an open-source image conversion suite. If you are on a Mac and you have <a href="http://www.macports.org/">MacPorts</a> installed, you can simply run <code>sudo port install ImageMagick</code> and let it do all the work for you.</p>
<p>For the sake of the example, let&#8217;s suppose that the images are in a directory called <em>stuff</em>, and that they have the most random names; some of them have names ending in <em>.JPG</em> (capitalized), some of them end in <em>.jpg</em> (not capitalized). Isn&#8217;t that a nightmare? Not really.</p>
<p>Please note that this example implies that you use <a href="http://www.gnu.org/software/bash/">bash</a> on any a Unix-like system. ImageMagick is available for many platform, including Windows, but you will need to find another way to run it on each file you need to resize. I personally use OS X.</p>
<p>Here is the sequence of steps we need to take to convert everything to HDTV size:<br />
<code><strong>octavarium:~/stuff jollino$ mkdir _<br />
octavarium:~/stuff jollino$ for f in *[Jj][Pp][Gg]; do convert $f -resize "1920x1080&gt;" _/$f; echo Image $f converted successfully; done<br />
</strong> Image 1b371a9f-a59c-4c5e-b9f2-9a8aa24c807e.original.jpg converted successfully<br />
Image 2fb7c7da-999d-4744-b8e8-dffa5d466736.original.jpg converted successfully<br />
Image 3a39767c-b830-4fb8-90ce-40d97e793c65.original.jpg converted successfully<br />
<em>[...]</em><br />
Image IMG_0737.JPG converted successfully<br />
Image IMG_0742.jpg converted successfully<br />
Image IMG_0745.JPG converted successfully<br />
Image IMG_0746.jpg converted successfully<br />
Image IMG_0750.JPG converted successfully<br />
<em>[...]</em></code></p>
<p><code><em></em><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;">The first command obviously creates a directory called _. You can name it any way you want, but I personally prefer very short names when dealing with batch processes, especially when there is little risk of confusion.</span></code></p>
<p>The second command is where the magic – no pun intended – happens. It can be read as folows:</p>
<ol>
<li>Iterate over each file in the current directory whose name ends in any case combination of &#8216;jpg&#8217;;</li>
<li>In each cycle, call the name <em>$f</em></li>
<li>Run the command: <code>convert $f resize "1920x1080&gt;" _/$f</code></li>
<li>Run the command: <code>echo Image $f converted successfully</code></li>
<li>Repeat for the next file</li>
</ol>
<p>As can be easily inferred, the actual conversion takes place in step #3. If the file name is <em>IMG_1891.jpg</em>, for instance, the command is expanded as <code>convert IMG_1891.jpg resize "1920x1080&gt;" _/IMG_1891.jpg</code>.</p>
<p>The <code>&gt;</code> character in the output image size is not a mistake: it tells <code>convert</code> that we want it to be 1920 pixels wide and 1080 pixels high&#8230; but the aspect ratio is our main priority.<br />
This means that images will not be smared to fill the 1920 x 1080 canvas; the output images will be at most 1920 pixels wide <strong>or</strong> 1080 pixels high, whichever can be optimized, and the other dimension will be changed accordingly. Okay, now that&#8217;s confusing. Let&#8217;s look at a few examples.</p>
<ul>
<li>A 2816 x 2112 image (4:3 horizontal) will be resized to 1440 x 1080. If it had been resized to 1920 x 1440, it would have had to be cropped to fit on a 1920 x 1080 screen.</li>
<li>A 2112 x 2816 image (4:3 vertical) will be resized to 810 x 1080. That sure beats a 1920 x 2560 image (which would end up bigger than the original anyway!)</li>
<li>A 3456 x 2304 image (3:2 horizontal) will be resized to 1620 x 1080.</li>
<li>A 3456 x 1944 image (16:9 horizontal) will be resized to 1920 x 1080.</li>
<li>A 1048 x 699 image (3:2 horizontal) will not be resized and will stay at 1048 x 699.</li>
<li>A 2148 x 2148 image (1:1 square) will be resized to 1080 x 1080.</li>
</ul>
<p>As you can see, most images will have a shorter horizontal side in order to accommodate for a as-tall-as-possible vertical side, as that is still shorter.</p>
<p>After doing all of this, make sure that the USB drive has a MBR rather than a GUID partition table <strong>and</strong> a FAT partition, and simply run:</p>
<p><code><strong>octavarium:~/stuff jollino$ cp -Xv _/* /Volumes/nameofyourdrive/</strong><br />
</code><br />
Gracefully eject the drive, remove it, and enjoy your pictures!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.avianbonesyndrome.com/2010/04/12/batch-converting-images-for-an-hdtv/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">23</post-id>	</item>
	</channel>
</rss>
