<?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>amazon | ウダ2Blog</title>
	<atom:link href="https://uda2.com/blog/tag/amazon/feed/" rel="self" type="application/rss+xml" />
	<link>https://uda2.com/blog</link>
	<description>大阪でフリーランスとしてWEB制作している管理人が気になった技術をメモったり、作ったツールの紹介などを綴っているブログです。</description>
	<lastBuildDate>Tue, 24 Feb 2015 05:27:43 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
	<item>
		<title>PHPで切り抜き画像を作ってみる</title>
		<link>https://uda2.com/blog/php%e3%81%a7%e5%88%87%e3%82%8a%e6%8a%9c%e3%81%8d%e7%94%bb%e5%83%8f%e3%82%92%e4%bd%9c%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b/</link>
					<comments>https://uda2.com/blog/php%e3%81%a7%e5%88%87%e3%82%8a%e6%8a%9c%e3%81%8d%e7%94%bb%e5%83%8f%e3%82%92%e4%bd%9c%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b/#comments</comments>
		
		<dc:creator><![CDATA[uda2]]></dc:creator>
		<pubDate>Tue, 28 Dec 2010 15:29:00 +0000</pubDate>
				<category><![CDATA[制作日記]]></category>
		<category><![CDATA[amazon]]></category>
		<guid isPermaLink="false">http://uda2.com/blog/?p=1099</guid>

					<description><![CDATA[<p>まとめサイトのサイドバナーによくamazonのフィギュアを載ってるのをよく見る。amazon画像編集ツールamacco -あまっこ-も元々CDのジャケット用に作ったのだけど実際は殆どフィギュアばかりだ。 大抵フィギュアの</p>
The post <a href="https://uda2.com/blog/php%e3%81%a7%e5%88%87%e3%82%8a%e6%8a%9c%e3%81%8d%e7%94%bb%e5%83%8f%e3%82%92%e4%bd%9c%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b/">PHPで切り抜き画像を作ってみる</a> first appeared on <a href="https://uda2.com/blog">ウダ2Blog</a>.]]></description>
										<content:encoded><![CDATA[<p><a href="http://uda2.com/mask/"><img fetchpriority="high" decoding="async" src="http://uda2.com/blog/wp-content/uploads/test.png" alt="" title="test" width="300" height="300" class="alignleft size-full wp-image-1100" srcset="https://uda2.com/blog/wp-content/uploads/test.png 300w, https://uda2.com/blog/wp-content/uploads/test-150x150.png 150w" sizes="(max-width: 300px) 100vw, 300px" /></a>まとめサイトのサイドバナーによくamazonのフィギュアを載ってるのをよく見る。<a href="http://amacco.uda2.com/" target="_blank">amazon画像編集ツールamacco -あまっこ-</a>も元々CDのジャケット用に作ったのだけど実際は殆どフィギュアばかりだ。<br />
大抵フィギュアの背景は白で味気ない「PhotoShopとかで魔法の杖（マジックワンド）を使ったら簡単に切り抜き画像作れそうだな」と思ってPHPのGDで出来ないか調べてみた。<br />
GDにはそんな機能は無かったが<a href="http://fussy.web.fc2.com/algo/index.htm" target="_blank">アルゴリズムの紹介</a>にシードフィルというアルゴリズムを使って塗りつぶす方法がC言語で書かれていたのでPHPでもやってみた。<br />
<a href="http://uda2.com/mask/" target="_blank">PHP 切り抜き</a><br />
画像上の切り抜きたい場所を適当にポチポチ数カ所クリックして画像生成を押すと切り抜き画像が出来る。<br />
白（左上の端の色）と画像の各ポイントの色の差を連想配列に入れておいて、画像上でクリックされた各ポイントからシードフィルアルゴリズムで塗りつぶしを繰り返し、（実際塗りつぶす訳じゃなく塗りつぶしのデータはマスク用の連想配列に入れる）処理が終わったら、マスクデータにぼかしをかけたりして、マスクを適用させて画像を生成するという感じ。<br />
今回はテストなので普通に多次元配列を使ったが色情報なのでサイズ固定のSplFixedArrayを使った方が速そうな気もするが・・・。<br />
あまりキレイでは無いので役に立たないかもしれないけどPHPで簡単切り抜き画像が作れることはできるという事が分かった。</p>The post <a href="https://uda2.com/blog/php%e3%81%a7%e5%88%87%e3%82%8a%e6%8a%9c%e3%81%8d%e7%94%bb%e5%83%8f%e3%82%92%e4%bd%9c%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b/">PHPで切り抜き画像を作ってみる</a> first appeared on <a href="https://uda2.com/blog">ウダ2Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://uda2.com/blog/php%e3%81%a7%e5%88%87%e3%82%8a%e6%8a%9c%e3%81%8d%e7%94%bb%e5%83%8f%e3%82%92%e4%bd%9c%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>裏技でamazon画像編集〝amacco〟</title>
		<link>https://uda2.com/blog/amacco/</link>
					<comments>https://uda2.com/blog/amacco/#respond</comments>
		
		<dc:creator><![CDATA[uda2]]></dc:creator>
		<pubDate>Sat, 16 Jan 2010 11:41:52 +0000</pubDate>
				<category><![CDATA[制作日記]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[画像編集]]></category>
		<guid isPermaLink="false">http://uda2.com/blog/?p=899</guid>

					<description><![CDATA[<p>半年以上前からちょっとずつ進めてたamazon画像編集ツールamacco（あまっこ）がようやく大体の形になったので公開します。 amazonの画像には裏技があって、そのアドレスをちょこっと書き換えるだけでトリミングやリサ</p>
The post <a href="https://uda2.com/blog/amacco/">裏技でamazon画像編集〝amacco〟</a> first appeared on <a href="https://uda2.com/blog">ウダ2Blog</a>.]]></description>
										<content:encoded><![CDATA[<p><a href="http://uda2.com/amacco/" target="_blank"><img decoding="async" src="http://uda2.com/blog/wp-content/uploads/amacco_s.jpg" alt="amacco_s" title="amacco_s" width="450" height="295" class="aligncenter size-full wp-image-898" /></a><br />
半年以上前からちょっとずつ進めてた<a href="http://uda2.com/amacco/" target="_blank">amazon画像編集ツールamacco（あまっこ）</a>がようやく大体の形になったので公開します。<br />
amazonの画像には裏技があって、そのアドレスをちょこっと書き換えるだけでトリミングやリサイズが出来ます。この機能を使ってあたかも編集したかの様な画像を生成するWEBツールです。</p>
<p>「自由な切り抜き」の方は上で書いた半年前に思いついた方で画像を回転し、トリミングし、リサイズするツールになります。<br />
回転させる画面はFlashを使っています。元々は青銅製の古びた道具のデザインを考えていたんだけど結局、思うような画にならなかったので、シンプルなのにしました。<br />
Flashは勉強も兼ねてActionScript3.0で作ったんだけど、ActionScript2.0とは全く別物になってるC言語よりになった感じだ。手続きが増えたのでソースは増えるがクラスをガンガン作っていくスタイルなので、長い目で見ると流用しやすく作業分担しやすくなり大規模なコンテンツを作りやすくなったが、初心者にはとっつきにくく私の様な小規模なFlashを作る人間からすると面倒だ。<br />
クリッピング（トリミング）の画面ではjQueryのプラグイン「<a href="http://deepliquid.com/content/Jcrop.html" target="_blank">Jcrop</a>」を使った。リサイズは縮小はamazonがやってくれるけど拡大はやってくれない様なのでhtml上で引き延ばす事にした。</p>
<p>「顔認識切り抜き」は<a href="http://kaolabo.com/webapi" target="_blank">顔ラボ</a>というサイトを最近見つけたので制作する事にした。<br />
顔ラボのAPIは画像の顔を認識して顔とおぼしき位置を返してくれる。その情報を使ってクリッピングしてリサイズしている。<br />
マンガの表紙でも顔と認識する事もあれば写真なのに認識しない場合もある。</p>
<p>これらのツールの制作が遅々として進まなかったのは使う人が少なそうだったからだ。がんばって作っても使う人が居なければ意味が無いのでテンションが上がらない。<br />
もし、顔ラボを見つけて無かったらお蔵入りしてたかもしれない。<br />
もう少し、実用的なのも1年以上前から考えていたがamazonの裏技を使う訳では無いので別立てにしようかと思う。</p>The post <a href="https://uda2.com/blog/amacco/">裏技でamazon画像編集〝amacco〟</a> first appeared on <a href="https://uda2.com/blog">ウダ2Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://uda2.com/blog/amacco/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Amazonのコーディング</title>
		<link>https://uda2.com/blog/amazon/</link>
					<comments>https://uda2.com/blog/amazon/#respond</comments>
		
		<dc:creator><![CDATA[uda2]]></dc:creator>
		<pubDate>Wed, 06 Aug 2008 10:55:58 +0000</pubDate>
				<category><![CDATA[制作日記]]></category>
		<category><![CDATA["My Release"]]></category>
		<category><![CDATA[amazon]]></category>
		<guid isPermaLink="false">http://uda2.com/wordpress/2008/08/amazon.html</guid>

					<description><![CDATA[<p>昨日、My Releaseの情報を更新しようと思ったらAmazonのホームページの仕様が変わったみたい、ソースを見てみると以前の様にテーブルでレイアウトされたものとスタイルシートでレイアウトされたものがあり（見た目は同じ</p>
The post <a href="https://uda2.com/blog/amazon/">Amazonのコーディング</a> first appeared on <a href="https://uda2.com/blog">ウダ2Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>昨日、My Releaseの情報を更新しようと思ったらAmazonのホームページの仕様が変わったみたい、ソースを見てみると以前の様にテーブルでレイアウトされたものとスタイルシートでレイアウトされたものがあり（見た目は同じ）、毎回新しいレイアウトなのでは無く、ときどき新しいレイアウトになるみたい。<br />
おそらく、分散化させてるサーバーの一部が変更になったのだろう。<br />
結局、古いのも残して新旧のソースを判断して情報を抽出する様に修正した。</p>The post <a href="https://uda2.com/blog/amazon/">Amazonのコーディング</a> first appeared on <a href="https://uda2.com/blog">ウダ2Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://uda2.com/blog/amazon/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
