4/15/2008

24bite RGB TO RGB565

因工作上的需要
需將24bite RGB 轉為 RGB565 格式
也就臨時動手寫了一個小程式
不過只是dos版的 :p
需配合這個網站
24bit RGB


執行程式後
將所查到的色碼
輸入程式中
即會轉出 RGB565的色碼
以下只是簡單的source 使用dev-c++所寫
有需要的朋友也可直接download exe檔

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
unsigned int R88;
unsigned int G88;
unsigned int B88;
unsigned int NEW_R5,NEW_G6,NEW_B5;
unsigned int RGB565;
char number_flag=1;

while(number_flag)
{
printf("please input RGB888 number :");
scanf("%d %d %d",&R88,&G88,&B88);
if((R88>=0 && R88<=255) && (G88>=0 && G88<=255)&&(B88>=0 && B88<=255))
number_flag=0;
else
printf("RGB888 number >255 is errro!! \n");
}

NEW_R5=R88>>3;
NEW_G6=G88>>2;
NEW_B5=B88>>3;
printf("change RGB888 TO RGB565 number: %d %d %d \n",NEW_R5,NEW_G6,NEW_B5);
RGB565 = NEW_R5<<11;
RGB565 |= NEW_G6<<5;
RGB565 |= NEW_B5;
printf("RGB565 number: %x \n ",RGB565);
system("PAUSE");
return 0;
}

RGB.rar

3/25/2008

Way back into love

K歌情人.......
算是舊片了吧
沒去電影院看過
只是偶爾會聽到這首歌
覺的還不錯

上次在HBO看到這片
才真正了解這首歌的意思
而愛上這首歌 :p
分享之


I've been living with a shadow overhead
我活在陰影之下
I've been sleeping with a cloud above my bed
烏雲伴我共枕
I've been lonely for so long
一直孤單好久
Traped in the past, I just can't seem to move on
困在過去,似乎就是無法往前走
I've been hiding all my hopes and dreams away
我把所有的希望和夢想藏起來
Just in case I ever need them again someday
只為了有一天可能又需要他們
I've been setting aside time
我總留點時間
To clear a little space in the corners of my mind
淨化心裡的小角落
All I want to do is find a way back into love
我只要重新找到愛的感覺
I can't make it through without a way back into love
若沒有愛的感覺我辦不到
Oh oh oh

I've been watching but the stars refuse to shine
我留心觀察然而繁星不願發亮
I've been searching but I just don't see the signs
我一直搜尋但看不到任何徵兆
I know that it's out there
我知道它不在那裡
There is got to be something for my soul somewhere
但一定有個為我靈魂而生的東西在某處
I've been looking for someone to shed some light
我一直尋找著讓我發光的人
Not somebody just to get me throught the night
而非只是個陪我過夜的傢伙
I could use some direction
我能使用一些指示
And I am open to your suggestions
而且我可能是你的暗示
All I want to do is find a way back into love
我只要重新找到愛的感覺
I can't make it through without a way back into love
若沒有愛的感覺我辦不到
And if I open my heart again
若我再次敝開心房
I guess I am hoping you will be there for me in the end
我想我希望最後你會在那裡等我

There are monents when I don't know if it is real
有時候我不確定它是不是真的
Or if anybody feels the way I feel
或許有人和我心有戚焉
I need inspiration
我需要妙計
Not just another negotiation
而非又一個妥協

All I want to do is find a way back into love
我只要重新找到愛的感覺
I can't make it through without a way back into love
若沒有愛的感覺我辦不到
And if I open my heart to you
若我為你打開心房
I am hoping you will show me what to do
希望你會告訴我該怎麼做
And if you help me to start again
若你幫我重新開始
You know that I will be there for you in the end
你知道最後我會在那裡等你

3/23/2008

心裡的秘密

未曾想過會在這個時間點遇上
計畫終就趕不上變化
勇於接受
真誠對待
無悔付出


未來4年時間
無法給予承諾
願真心守候..............

今生無所求
同甘共苦牽手走

3/20/2008

愛情期限

愛情有期限嗎?
電影名言"如果要加上個期限,我希望是1萬年"
如果每件事的開始,就會伴隨著結束
而這結束的時間又是我們所不能預期的
那何不把重點放在結束前
全心全意投入
也就不用害怕結束的到來


愛情是最讓人捉摸不定的
永遠不知何時到來
何時結束
與其加上一個期限
不如好好去對待
去愛,包容,體諒
今生有個人陪你走完另一程
也就足夠了

3/05/2008

爭!

最近,好像對game太認真了
認真,是好事
但,對沒有意義的事認真是壞事


game,每個人的想法玩法看法都不同
或許我真的很會玩,
但,認真的和別人爭論玩法對不對
有意義嗎?.....

爭一時,贏一時,輸友情
game只是用來放鬆,而不是另一個爭的開始

我,對game
太認真了........

2/29/2008

AUTORUN.INF 語法

最近工作上的需要
需使用到AUTORUN.INF
也就寫下了這篇


使用一般記事本或編寫工具
[AutoRun] //使用autorun 格式
OPEN = SETUP.EXE //開啟的執行檔
ICON = SETUP.ICO //指定所要使用的光碟圖示

如果執行的程式不是EXE檔
則需加 START
ex: open = start readme.txt

如要開啟的是網頁而不是檔案則為
[autorun]
open=Explorer.exe http://tw.yahoo.com

因每人所使用的瀏覽器不同
所以直接呼叫檔案總管
使用內定瀏覽器開啟網頁
而不是使用IEXPLORE.EXE

如需開啟其它檔也是使用以上例子
讓檔案總管直接以內定的程式開啟

看了以上說明
腦筋動的快的
就能寫出一個害人的程式了 :P