#setlinebreak(on) * The PHP JPEG Metadata Toolkit [#bb5c665e] #htmlinsert(googleAdsense.html) #ref(http://dozo.rgr.jp/img/img20_file.png,right,nolink,around,PHP::PEAR) PEARのライブラリは案外画像系が少なかったり。 画像のフォーマット変換、リサイズとからならまだあるのだが、 ちょっと特殊なことをしようとするとお手上げ状態。 例えばケータイの著作権保護目的でいれる再配布不可識別子。 画像のプロパティに”著作権 あり”とか”転送 ×”とか言うものを見たことはないだろうか? あれは画像自体に、この画像は著作権保護されていますよという文字が入っている。(softbankは異なる) それが再配布不可識別子というもの。 実際には画像のヘッダー部のメタ情報に文字列が刻まれている。 内容は Docomo copy="NO" au kddi_copyright=on ツールを使って埋め込みをするのだが、 状況によってはプログラムでやりたい場合もあるだろう。 そんなときに使うのがこれ。 The PHP JPEG Metadata Toolkit http://www.ozhiker.com/electronics/pjmt/ 実際その目的で使われるのではないが、 Toolkitのメインの機能は私にはよくわからないので割愛。 使い方はこんな感じ require_once("PHP_JPEG_Metadata_Toolkit/JPEG.php"); $str = 'copy="NO",kddi_copyright=on'; $headers = get_jpeg_header_data( $output_file ); $newHeader = put_jpeg_Comment($headers, $str); put_jpeg_header_data( $output_file, $output_file, $newHeader ); ちなみにsoftbankの場合は 拡張子を.jpzに変えればOK。 PATHINFOを使っても有効なので、 プログラムでやっている場合でも大丈夫。 http://hogehoge.com/index.php/hoge.jpz てな具合にしておけばちゃんと著作権保護されます。 (Apacheの設定をお忘れ無く) 参考: ・・・どこだったか忘れちゃった。。。 -すばらしい情報ありがとうございます。JPEGはバッチリなんですが、GIFで同様の事ができるライブラリってご存知ないですか? -- [[atusi]] &new{2006-12-20 05:48:51 (水)}; -JPEG以外のライブラリは今のところ見つかってないですねぇ。ご存じの方がいたら情報ください。 -- [[dozo]] &new{2006-12-20 23:21:12 (水)}; -GIF画像のヘッダにコメントの方法をいろいろ探してみたのですが、PHPではなさそうでした。Cで書かれたものが、http://module.jp/blog/comment_in_imagefile.html にあったので、PHPからexec()する事にしました。それ以前の処理でImageMagickも使っているのでオーバーヘッドがちょっと気になりますが…。 -- [[atusi]] &new{2006-12-22 22:29:18 (金)}; -なるほど。変換は登録時にしておいて、表示時にには変換結果+キャッシュという仕様にしておけば、多少のオーバーヘッドは消せますよ。 -- [[dozo]] &new{2007-01-10 04:24:10 (水)}; -<a href= http://topserch.info/index.html >index</a> [url=http://topserch.info/index.html]index[/url] <a href= http://topserch.info/index1.html >index1</a> [url=http://topserch.info/index1.html]index1[/url] <a href= http://topserch.info/index2.html >index2</a> [url=http://topserch.info/index2.html]index2[/url] <a href= http://topserch.info/index3.html >index3</a> [url=http://topserch.info/index3.html]index3[/url] <a href= http://topserch.info/index4.html >index4</a> [url=http://topserch.info/index4.html]index4[/url] <a href= http://topserch.info/index5.html >index5</a> [url=http://topserch.info/index5.html]index5[/url] <a href= http://topserch.info/index6.html >index6</a> [url=http://topserch.info/index6.html]index6[/url] <a href= http://topserch.info/index7.html >index7</a> [url=http://topserch.info/index7.html]index7[/url] <a href= http://topserch.info/index8.html >index8</a> [url=http://topserch.info/index8.html]index8[/url] <a href= http://topserch.info/index9.html >index9</a> [url=http://topserch.info/index9.html]index9[/url] <a href= http://topserch.info/index10.html >index10</a> [url=http://topserch.info/index10.html]index10[/url] <a href= http://topserch.info/index11.html >index11</a> [url=http://topserch.info/index11.html]index11[/url] <a href= http://topserch.info/index12.html >index12</a> [url=http://topserch.info/index12.html]index12[/url] <a href= http://topserch.info/index13.html >index13</a> [url=http://topserch.info/index13.html]index13[/url] <a href= http://topserch.info/index14.html >index14</a> [url=http://topserch.info/index14.html]index14[/url] -- [[gera]] &new{2007-05-11 23:40:13 (金)}; -<a href= http://www.sccs.swarthmore.edu/org/daily/forum/papview.php?id=7118 >generic viagra buy viagra ></a> [url=http://www.sccs.swarthmore.edu/org/daily/forum/papview.php?id=7118]generic viagra buy viagra >[/url] <a href= http://www.sccs.swarthmore.edu/org/daily/forum/papview.php?id=7116 >poker viagra generic viagra ></a> [url=http://www.sccs.swarthmore.edu/org/daily/forum/papview.php?id=7116]poker viagra generic viagra >[/url] <a href= http://www.bsu.edu/capic/irvington/forum/forum_posts.asp?TID=57 >natural viagra natural viagra ></a> [url=http://www.bsu.edu/capic/irvington/forum/forum_posts.asp?TID=57]natural viagra natural viagra >[/url] <a href= http://www.bsu.edu/capic/irvington/forum/forum_posts.asp?TID=58 >buy viagra now order viagra ></a> [url=http://www.bsu.edu/capic/irvington/forum/forum_posts.asp?TID=58]buy viagra now order viagra >[/url] -- [[gnus]] &new{2007-05-12 05:46:44 (土)}; #comment