Changeset 4028
- Timestamp:
- Sep 15, 2007, 7:28:04 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE/branches/work/tsubasa/prj_cmd/setup/script/option-convert_ktai_emoji.php
r4025 r4028 29 29 break; 30 30 case 'e': 31 31 convert_e_emoji_img($input_path, $output_path); 32 32 break; 33 33 case 's': 34 convert_s_emoji_img($input_path, $output_path); 34 35 break; 35 36 default: … … 101 102 } 102 103 103 //function convert_s_emoji_img(){} 104 function convert_s_emoji_img($input_path, $output_path) //SoftBank 105 { 106 $input_dir = opendir($input_path); 107 108 if ($input_dir !== false && $output_dir !== false) { 109 while (($file = readdir($input_dir)) !== false) { 110 // var_dump($file); 111 if (array_pop(explode('.', $file)) == 'gif') { 112 $code = hexdec('0x' . basename($file, '.gif')); 113 if ((0xF741 <= $code) && ($code <= 0xF77E) || 114 (0xF780 <= $code) && ($code <= 0xF79B) || 115 (0xF7A1 <= $code) && ($code <= 0xF7F3) || 116 (0xF941 <= $code) && ($code <= 0xF97E) || 117 (0xF980 <= $code) && ($code <= 0xF99B) || 118 (0xF9A1 <= $code) && ($code <= 0xF9ED) || 119 (0xFB41 <= $code) && ($coce <= 0xFB7E) || 120 (0xFB80 <= $code) && ($code <= 0xFB8D) || 121 (0xFBA1 <= $code) && ($code <= 0xFBD7)) { 122 $emoji_bin = pack("C*" , $code >> 8 , $code % 256);//±±ªìêêΨ¯[; 123 } 124 $emoji_num = str_replace('%', '', emoji_escape_sb($emoji_bin)); 125 if (!empty($emoji_num)){ 126 $input_emoji = $input_path . $file; 127 $output_emoji = $output_path . $emoji_num . '.gif'; 128 copy($input_emoji,$output_emoji); 129 } 130 } 131 } 132 } 133 } 104 134 ?>
Note: See TracChangeset
for help on using the changeset viewer.