本來這個blog是記錄開發輸入法的點滴的,後來越來越雜,現在什麼都記錄了。

2012年8月11日 星期六

怎樣用 Photoshop 弄合回鄉証 / 特區護照 規格的照片?

怎樣用 Photoshop 弄合回鄉証 / 特區護照 規格的照片?

背景資料

  • 特區護照的要求
  • 回鄉証的要求

    特別注意是,回鄉証的要求是背景必須是純白色,我試過拿一張偏灰背景的照片去申請,結果被中旅社的職員彈回。後來隨便到附近的照片舖拍一張,該照 片拍得我極不滿意的。回鄉証還要一用是十年,現每次用回鄉証都覺得有點不開心。
    另外注意初生BB和年幼小朋友的照片是特別難拍的,照相舖職員的耐性都不是很大的。

  • 快圖美照片規格:
    產品名稱 尺寸(英吋) 最佳解像度要求
    (像素)
    最低解像度要求
    (像素)
    4D 4.5x6 1350x1800 810x1080

拍証件照片的步驟:
  1. 用普通數碼相機,拍一張頭像照片,並符合以下要求:
    • 背景要白色。
      白色背景可以家裡白色的牆,又可以是地鐵站/商場外白色的牆。舉例:

      商場外白色的牆:


      地鐵站白色牆:
    • 不能有陰影。拍照時,人不能太近白色的背景,否則會有陰影。
    • 燈光建議使用陽光。白色光管的光都可以。
    • 不能使用手機拍攝,因為手機鏡頭小,拍出來的照片雜訊多,顆粒大。
    • 為了方便之後的說明,用一個玩具熊在白色寫字板上拍一張照:


  2. 用 Photoshop 將背景變成純白色.
    • 用 Photoshop 開啟拍攝好的頭像照片。


    • 到 Photoshop 的菜單 → 影像 → 調整 → 色階.


    • 在色階的視窗裡面, 按一下 「在影像中取樣以設定最暗點」按鈕。


      然後在頭像照片中最暗(或最黑色)的地方(例如眼珠或頭髮)點一下。

      注意頭像照黑色的地方會更加黑色。


      而色階的統計圖則變成:


    • 在色階的視窗裡面, 按一下 「在影像中取樣以設定最亮點」按鈕。


      然後在頭像照片中最亮點點一下。建議選擇白色背景中比較暗的地方。

      注意頭像照中的背景已經變成純白色:


      而色階的統計圖則變成:


     
  3. 將頭像照縮放、移位以符合証件要求。
    • 下圖是一張 1600x1200 像素 gif。它是用來幫助調校頭像照的大小,以符合証件要求。它的寬高比例符合 4D 照片。
      下載此圖 (photos_passport_frame-4D.gif)及存檔


    • 在 Photoshop 開啟 photos_passport_frame-4D.gif


    • 將 photos_passport_frame-4D.gif 改為彩色圖。方法:選擇 Photoshop 的菜單 → 影像 → 模式 → RGB 色彩.


    • 返回頭像照,在頭部連肩膀選擇及拷貝(複製)一個長方形範圍:


    • 返回 photos_passport_frame-4D.gif,貼上剛才複制的長方形範圍。


    • 到圖層的小視窗。剛才貼上去的長方形範圍,被放到最上層。將它拉到第二層。


      框線就會重現:


    • 選擇 Photoshop 的菜單 → 編輯 → 變形 → 縮放
    • 按住 Shift 鍵(再重覆:按住 Shift 鍵),將頭的範圍(頭髮頂端到下巴)縮小並移動到長方格內。
      (按住 Shift 鍵是要維持頭像的寬高比例)


    • 點選一下工具列上的「選擇」按鈕。並套用之前縮放的動作


    • 選擇相框以外的頭像範圍,用鍵盤 Delete 鍵清除。


    • 將相框內的頭像照複制3次


    • 返回圖層 1,選擇相框內小長方形,並用 Delete 鍵清除




    • 剛才做的是特區護照規格照片。用同樣方法做回鄉証規格照片。


    • 將檔案另存新檔,格式選擇 JPEG,品質選擇 8-10。

    • 將檔案拿去「快圖美」,切記用 4D 格式沖哂。哂完後用剪刀裁剪就能得到符合規格的証件照片。

2012年7月15日 星期日

熱帶氣旋怎麼走?

熱帶氣旋到底會怎麼走? 熱帶氣旋路線怎麼走,會受到副熱帶高壓和海 水溫度的影響。副熱帶高壓是指一個在亞熱帶 地區海上暖氣團下降的區域,它們會把熱帶氣 旋往外推開,不讓它靠近。所以熱帶氣旋會沿 著副熱帶高壓的外圍走。隨著副熱帶高壓的變 大或變小,熱帶氣旋走的路線也會跟著改變。 這些變化非常快,有時連氣象專家都很難準確 預測! →副熱帶高壓是指亞熱 帶地區海上(太平洋的北 邊)一股海上暖氣團,是 高空暖空氣往下流動所 形成的氣團。和熱氣由 下往上流的熱帶氣旋剛 好相反。 副熱帶高壓 熱帶氣旋 Bye Bye. 我往這裡 走嘍! 嘿嘿! 不讓你過! ↗因為副熱帶高壓的熱空氣會往外送,所以和 熱帶氣旋相遇時,也會把熱帶氣旋往外推,熱 帶氣旋也只好饒著它的邊緣走。

2012年4月11日 星期三

Doraemon in SVG format doraemon.svg

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   version="1.1"
   width="400"
   height="200" >

   <g transform="translate(226,56)">
    <path id="face" d="M -37 52 A 55 45 0 1 1 37 52 Z" style="fill:white;stroke:none" />
    <path id="head" d="M -37 52 A 55 45 0 1 1 37 52
                       L 47 52
                       A 64 64 0 1 0 -47 52
                       Z" style="fill:deepskyblue;stroke:black;stroke-width:2" />

    <circle id="nose" r="7" fill="red" stroke="black" stroke-width="2" />
    <ellipse id="lefteye" cx="-18" cy="-18" rx="18" ry="18" fill="white" stroke="black" stroke-width="2"/>
    <circle id="lefteye_center" r="2" cx="-9" cy="-10" fill="black" stroke="black" stroke-width="2" />
    <ellipse id="righteye" cx="18" cy="-18" rx="18" ry="18" fill="white" stroke="black" stroke-width="2"/>
    <circle id="righteye_center" r="2" cx="9" cy="-10" fill="black" stroke="black" stroke-width="2" />
    <line id="mouth_top_vert" x1="0" y1="7" x2="0" y2="45" stroke="black" stroke-width="2" />
    <path id="mouth" d="M -32,29 A 40 40 0 0 0 32 29" style="fill:none;stroke:black;stroke-width:2" />

    <path id="moustache_left_top" d="M -44 24 l 21 -6" style="stroke:black;stroke-width:2;fill:none"/>
    <path id="moustache_left_mid" d="M -44 12 l 22 0"  style="stroke:black;stroke-width:2;fill:none"/>
    <path id="moustache_left_btm" d="M -44  0 l 21 6"  style="stroke:black;stroke-width:2;fill:none"/>

    <path id="moustache_right_top" d="M 44 24 l -21 -6" style="stroke:black;stroke-width:2;fill:none"/>
    <path id="moustache_right_mid" d="M 44 12 l -22 0"  style="stroke:black;stroke-width:2;fill:none"/>
    <path id="moustache_right_btm" d="M 44  0 l -21 6"  style="stroke:black;stroke-width:2;fill:none"/>

    <path id="head_body_separator" d="M 47 52
                                      A 2 2 0 1 1 47 62
                                      L -47 62
                                      A 2 2 0 0 1 -47 52
                                      Z" style="fill:red;stroke:black;stroke-width:2" />

    <path id="body_outline" d="M -47 62 L -69 77 A 15 15 1 0 1 -57 98 L -47 89 L -47 127 L -7 127
                               A 2 2 0 1 1 7 127 L 47 127 L 47 89 L 57 98 A 15 15 1 0 1 69 77 L 47 62 Z"
                            style="fill:deepskyblue;stroke:black;stroke-width:2" />

    <path id="body_outline" d="M -30 62 A 35 35 1 1 0 30 62 Z"
                            style="fill:white;stroke:black;stroke-width:2" />

    <path id="pocket" d="M -25 80 A 25 25 1 0 0 25 80 Z"
                            style="fill:none;stroke:black;stroke-width:2" />
    <g id="ring">
      <path id="ring_outline" d="M -6 62 A 8 8 0 0 0 0 74 L 0 68 L 0 74 A 8 8 0 0 0 6 62 Z"
                              style="fill:yellow;stroke:black;stroke-width:2;" />
      <circle id="ring_center" r="2" cx="0" cy="68" style="fill:black;stroke:none" />
    </g>

    <path id="left_hand" d="M -69 77 A 15 15 1 0 1 -57 98 A 15 15 1 1 1 -69 77"
                            style="fill:white;stroke:black;stroke-width:2" />

    <path id="left_foot" d="M -8 140 A 8 8 0 0 0 -7 127 L -47 127 A 8 8 0 0 0 -50 140 Z"
                            style="fill:white;stroke:black;stroke-width:2" />

    <path id="right_hand" d="M 69 77 A 15 15 1 0 0 57 98 A 15 15 1 1 0 69 77"
                            style="fill:white;stroke:black;stroke-width:2" />

    <path id="right_foot" d="M 8 140 A 8 8 0 0 1 7 127 L 47 127 A 8 8 0 0 1 50 140 Z"
                            style="fill:white;stroke:black;stroke-width:2" />

  </g>
</svg>

2012年3月29日 星期四

Hong Kong Emblem Simplest SVG (hollow) 香港旗 香港徽號 SVG (空心).

>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
  xmlns:svg="http://www.w3.org/2000/svg"
  xmlns="http://www.w3.org/2000/svg"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  version="1.0" width="450" height="450" >

  <style type="text/css" >
    <![CDATA[
      text.emblemChars {
          fill:red; stroke:red; text-anchor:middle; font-size:35px; font-family: SimHei;
      }
    ]]>
  </style>

  <defs>
      <path id="petalOutline" d="M 0 0
               A 20 25 0 1 1 0 -135
               A 30 30 0 0 0 0 -90
               A 30 30 0 0 1 0 -45
               A 30 30 0 0 0 0 0 z"
               stroke="none" fill="#black" />

      <g id="petalDetails">
        <polygon fill="red" stroke="none"
                points="0,-12 3,-3.5 12,-3.5 5,2 7.5,10.5 0,5.5 -7.5,10.5 -5,2 -12,-3.5 -3,-3.5"
                transform="translate(-20,-75) rotate(30)" />
        <path d="M 0 0
                 A 60 60 0 0 1 -30 -60"
                 stroke="red" fill="none" stroke-width="1px" />
      </g>

  </defs>

  <g transform="translate(225, 225)">
    <defs>
      <mask id="myMask" maskUnits="userSpaceOnUse" x="-180" y="-180" width="360" height="360">
        <!-- by default the whole rectangle is a big hole -->
      
        <!-- add a white rectangle so that the whole area is not a hole -->
        <rect x="-180" y="-180" width="360" height="360" fill="#fff" />
      
        <!-- fill the parts you think should become hollow with white coor -->
        <use xlink:href="#petalOutline" transform="rotate(13.48)" />
        <use xlink:href="#petalOutline" transform="rotate(85.48)" />
        <use xlink:href="#petalOutline" transform="rotate(157.48)" />
        <use xlink:href="#petalOutline" transform="rotate(229.48)" />
        <use xlink:href="#petalOutline" transform="rotate(301.48)" />
      </mask>
    </defs>

    <circle fill="none" stroke="red" cx="0"  cy="0"  r="220"/>
    <g mask="url(#myMask)">
      <circle fill="red" stroke="none" cx="0"  cy="0"  r="180"/>
    </g>
    <use xlink:href="#petalDetails" transform="rotate(13.48)" />
    <use xlink:href="#petalDetails" transform="rotate(85.48)" />
    <use xlink:href="#petalDetails" transform="rotate(157.48)" />
    <use xlink:href="#petalDetails" transform="rotate(229.48)" />
    <use xlink:href="#petalDetails" transform="rotate(301.48)" />

    <text class="emblemChars" y="-186" transform="rotate(-110.5)"></text>
    <text class="emblemChars" y="-186" transform="rotate( -93.5)"></text>
    <text class="emblemChars" y="-186" transform="rotate( -76.5)"></text>
    <text class="emblemChars" y="-186" transform="rotate( -59.5)"></text>
    <text class="emblemChars" y="-186" transform="rotate( -42.5)"></text>
    <text class="emblemChars" y="-186" transform="rotate( -25.5)"></text>
    <text class="emblemChars" y="-186" transform="rotate(  -8.5)"></text>
    <text class="emblemChars" y="-186" transform="rotate(   8.5)"></text>
    <text class="emblemChars" y="-186" transform="rotate(  25.5)"></text>
    <text class="emblemChars" y="-186" transform="rotate(  42.5)"></text>
    <text class="emblemChars" y="-186" transform="rotate(  59.5)"></text>
    <text class="emblemChars" y="-186" transform="rotate(  76.5)"></text>
    <text class="emblemChars" y="-186" transform="rotate(  93.5)"></text>
    <text class="emblemChars" y="-186" transform="rotate( 110.5)"></text>

    <text class="emblemChars" y="-186" transform="rotate(-125.0)"></text>
    <text class="emblemChars" y="-186" transform="rotate( 125.0)"></text>

    <text class="emblemChars" y="+215" transform="rotate( 33.0)">H</text>
    <text class="emblemChars" y="+215" transform="rotate( 23.7)">O</text>
    <text class="emblemChars" y="+215" transform="rotate( 14.3)">N</text>
    <text class="emblemChars" y="+215" transform="rotate(  5.0)">G</text>
    <text class="emblemChars" y="+215" transform="rotate( -5.0)">K</text>
    <text class="emblemChars" y="+215" transform="rotate(-14.3)">O</text>
    <text class="emblemChars" y="+215" transform="rotate(-23.7)">N</text>
    <text class="emblemChars" y="+215" transform="rotate(-33.0)">G</text>
 </g>
</svg>