These pages are written by only Japanese.
|
Namazu for hns による簡易全文検索です。 詳細は 詳細指定/ヘルプをご参照下さい。 |
|||||||||||||||||||||||||||||||||||||||||||
yoya-Mac-mini:~ yoya$ /usr/bin/php -v PHP 4.4.9 (cli) (built: Sep 17 2008 16:31:15) Copyright (c) 1997-2008 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologiesなるほど。PHP4 は無理です…
yoya-Mac-mini:~ yoya$ /home/yoya/tmp/php529/bin/php -v PHP 5.2.9 (cli) (built: Feb 1 2010 19:24:32) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies実行パスを通したら、
PATH=$HOME/tmp/php529/bin:$HOME/bin:/usr/local/bin:$PATHあっさり、コンパイル出来て dump も普通に出来ました。
magic=CWS version=6 file_length=2902016 rect=(0, 0)-(800, 545) (f_size=15) frame_rate=30.0 frame_count=1183 [0] tag=SetBackgroundColor(9) length=3 [1] tag=JPEGTables(8) length=574 [2] tag=DefineBitsJPEG(6) length=31897 image_id=1 jpeg_data_size=31895問題なく動いてそう。 Intel Mac が手に入ったのでそちらでも確認して、あと、 Web 越しに API 叩いてみてから、動作確認済みプラットフォームに追加しておこう。
yoya-no-MacBook-Pro:~ yoya$ cd svn/swfed/trunk/src/ yoya-no-MacBook-Pro:src yoya$ phpize grep: /usr/include/php/main/php.h: No such file or directory grep: /usr/include/php/Zend/zend_modules.h: No such file or directory grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory Configuring for: PHP Api Version: Zend Module Api No: Zend Extension Api No: Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.う、うーん。
% cd svn/swfed/trunk/src % phpize % ./configure % make % sudo -s # make install # cd /etc # cp php.ini.default php.ini # vi php.ini # ← extension=swfed.so を追加swfdump.php や www/index.php も問題なく動いているので、 これで Macintosh 上での動作確認 done.
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x8013020b0 (LWP 100090)] 0x00000008010f9bc9 in free () from /lib/libc.so.7たまに出るって事は Thread Manager 辺りで何か忘れてるのかな…
# cd /usr/ports/lang/php5 # make install (チェックボックスで apache module を有効に) # env FORCE_PKG_REGISTER=t make install # vi /usr/local/etc/apache22/httpd.conf AddHandler cgi-script .cgi AddHandler php5-script .php AddType text/html .php # cd /usr/ports/lang/php5-extensions/ # make install (チェックボックスで GD と MB STRING を有効に) # env FORCE_PKG_REGISTER=t make install # /usr/local/sbin/apachctr restartこれで動きました。
for ($i=0; $i<18 ; $i++) { $obj->output(); }で seg.fault が発生しました。
#0 0x2853728b in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7 #1 0x288b8283 in bitstream_realloc (bs=0x200) at /home/yoya/svn/swfed/trunk/src/bitstream.c:53 #2 0x288b84f0 in bitstream_putbyte (bs=0x29258ec0, byte=136) at /home/yoya/svn/swfed/trunk/src/bitstream.c:127該当コード
int bitstream_putbyte(bitstream_t *bs, int byte) { bitstream_align(bs); if (bs->data_len < bs->byte_offset ) { return 1; } if (bs->data_len == bs->byte_offset ) { if (bs->data_alloc_len <= bs->byte_offset ) { bitstream_realloc(bs);bitstream_realloc を呼ぶ直前で print して bs の値が変わっていない事を確認。
Code Sign error: The identity 'iPhone Developer' doesn't match any valid certificate/private key pair in the default keychainBundle Identifier を App Identifer のドメイン部(jp.awm.iphone) にしたら直りました。
Can’t install application The Info.plist for application at (null) specifies a CFBundleExecutable of (null), which does not existこの通りに、実行ファイルの出力先を指定して解決。
http://diary.awm.jp/~yoya/data/2008/09/16/gif_dump.c? のプログラムなのですが、 画像のヘッダ情報はうまくとれるのですが 肝心の画像の先頭ピクセルにうまくアクセスできていない様に思います。といった質問を見つけました。
printf("RasterBits:\n"); for (y = 0 ; y < desc.Height ; y++) { printf(" y=%d:", y + desc.Top); for(x = 0 ; x < desc.Width ; x++) { printf(" %02x", image.RasterBits[ii] & 0xff); ii++; } printf("\n"); }でも、これ 1 byte なのに? RGB は 3bytes じゃないの?
+--+--+ |赤|緑| +--+--+ |青|黒| +-----+
255,0,0, 0,255,0, 0,0,255, 0,0,0 <-- ラスタデータ ------------->
255,0,0, 0,255,0, 0,0,255, 0,0,0, 0, 1, 2, 3 <-- カラーマップ --------------> <ラスタデータ->giflib が取り出せるのは、このカラーマップと色インデックス値の配列です。
ColorMapObject *ColorMap;で表現されているのが、カラーマップ (SColorMap と ImageDesc.ColorMap があるのは後述)で、
printf("RasterBits:\n"); for (y = 0 ; y < desc.Height ; y++) { printf(" y=%d:", y + desc.Top); for(x = 0 ; x < desc.Width ; x++) { printf(" %02x", image.RasterBits[ii] & 0xff); ii++; } printf("\n"); }で表示しているのが、パレット形式のラスタデータ(カラーマップへのインデックスの配列)です。
for (j = 0, BufferP = Buffer; j < ScreenWidth; j++) { ColorMapEntry = &ColorMap->Colors[GifRow[j]]; *BufferP++ = ColorMapEntry->Red; *BufferP++ = ColorMapEntry->Green; *BufferP++ = ColorMapEntry->Blue; }
このメールアドレスはすでに登録されていますとか出てきて、次進めません。