はやみずです 松尾さんの変更に手を加えて、画像のリサイズに一時ファイルを用いないよう にしました。convertとの入出力は標準入出力を使い、一時的なデータは with-temp-buffer で作ったバッファに置いておくようにすれば、ファイルを作 る必要がなくなります。
あと、アイコンの画像ファイル自体も保存しなくてよいだろう、と考えていま す。今はdisplay specに (image :type 'png :file "/path/to/file") として 画像を表示していますが、:data 属性を使って (image :type 'png :data "<binary data>") と書いてやれば画像をファイルに保存する必要がありません。 ---- Yuto Hayamizu Master's degree student at Kitsuregawa Laboratory Department of Information and Communication Engineering Graduate School of Information Science and Technology University of Tokyo From: [email protected] Subject: Re: [twmode-users] make-temp-file周りの修正 Date: Wed, 30 Dec 2009 10:51:56 +0900 (JST) > ご指摘ありがとうございます。mergeしました。 > > By default, the image format of `file' is determined by its > magic number. To specify a particular image format, precede the > filename with an image format name and a colon (i.e. ps:image) > or specify the image type as the filename suffix > (i.e. image.ps). Specify 'file' as '-' for standard input or > output. > > ImageMagick(convert)の上記の機能を使った、ということですね。 > > >> 松尾です。 > >> commit 506907088a7c22068a57a5a857cbc291ebdcdf16 の修正では >> make-temp-file() を一時ファイル名生成のために使うかたちに >> なっています。 > >> make-temp-file() は空の一時ファイルを作ってその名前を返す >> 関数なので、このとき生成された一時ファイルは利用もされずに >> 残ってしまいます。 > >> convertのコマンドラインで画像フォーマットを指定すれば拡張子 >> は必要ありませんので、make-temp-file() の引数の問題も回避 >> できます。 > >> http://github.com/cvmat/twittering-mode/tree/fix-image-type >> に commit してあります。 >> 問題なければmergeをお願いします。 > >> --- >> 松尾 直志 <[email protected]> > >> ------------------------------------------------------------------------------ >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast and easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> twmode-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/twmode-users > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > twmode-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/twmode-users ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ twmode-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/twmode-users
