顯示具有 Web 標籤的文章。 顯示所有文章
顯示具有 Web 標籤的文章。 顯示所有文章

2009年2月3日 星期二

Scene7 的說明



http://help.adobe.com/en_US/Scene7/4.0/WS26AB0D9A-F51C-464e-88C8-580A5A82F810.html

Scene7 的使用說明


Scene7 的使用說明

http://help.adobe.com/en_US/Scene7/4.0/WS26AB0D9A-F51C-464e-88C8-580A5A82F810.html

2009年1月21日 星期三

Microsoft Silverlight DeepZoom

Viewing Large Images - OpenLayers, GSIV, ModestMaps, DeepZoom, and Python







Viewing Large Images - OpenLayers, GSIV, ModestMaps, DeepZoom, and Python






Lately
I’ve been experimenting with displaying very large images on the
internet via a web browser, with pan and zoom functionality. The guts
of this functionality are the same regardless of implementation. On the
server, a tile cutter processes a large image, and constructs an image
pyramid. The image pyramid is a hierarchical structure composed of n
levels of the same image at different resolutions. Starting with the
bottom level as the original image, each successive level reduces the
image size by half, and the process is repeated log_2( max( width,
height)) times until finally an image of only 1 pixel (average of
entire image) is generated as the top of the pyramid. Each level’s
image is split into a set of fixed size tiles. A web browser client
implementation ( flash, ajax, etc) constructs  a zoom interface, that
responds to zoom in events by moving the viewport progressively further
down the pyramid, showing tile images of the larger resolution to give
the effect of zooming into an image. A nice illustrated write up of the
concept can be found here. I’ve probably made it sound more complicated than it really is.


The initial implementation I was working with utilized OpenLayers, which implements a client for accessing OpenGIS Web Feature Servers (WFS) and Web Mapping Servers (WMS).
Unfortunately the size of the library seems to be constantly increasing
(~200K in the last year) and currently weighs in at 560K uncompressed,
and requires a special implementation to serve up the tile images, ie.
a WMS Compliant system, in this case TileCache. For scaling and efficiency purposes, I’d much prefer to directly serve these images off a CDN, disk (nginx), or via varnish
and bypass any application code. Additionally the sheer size of the
OpenLayers code was unwieldy for the integrations requirements I had,
which did not include any GIS functionality.


Surveying the land for other non-commercial image viewers, turned up a few of interest. GSIV
( Giant Scalable Image Viewer), was a fairly basic but capable
javascript based viewer, that fit my requirements bill, small size at
26Kb uncompressed, and focused on pan and zoom functionality (demo).
However as a project it appears to be abandoned, and hasn’t been
touched in two years, although several patches have been submitted
which retrofit the implementation using jquery are extant.


I came across ModestMaps next, which is a flash (2 & 3 ) based implementation, with a small size (demo).
One nice feature of modest maps, is that it performs interpolation
between successive levels giving a smooth zoom experience to an end
user unlike somewhat jerky experience that GSIV produced. Unfortunately
being flash based meant a whole different chain of development tools. I
looked around at what was available for an opensource flash compiler
toolchain and found MTASC (Motion Twin Action Script Compiler ) and Haxe.
In the end i decided against it, partly due to its GIS focus, and the
customization/ maintenance cost for developing on propretiary platform
(Flash). Despite that, i think its the best of the opensource viewer
implementations if your already have/use an adobe flash development
stack.


I was set on using GSIV, and then i came across a blurb on ajaxian
about Seadragon Ajax and Deep Zoom from Microsoft’s Live Labs.
Microsoft’s done some impressive work with image manipulation over the
last few years. The PhotoSynth TED talk is one of the most impressive technology demos i’ve seen to date. Deep Zoom is a SilverLight technology ( more propretiary platform lockin), that allows for multiscale image zooming with smooth zooming. The Seadragon Ajax
is a javascript implementation of the same functionality in a 154k
library ( 20k minimized and gzipped). It fit the bill perfectly,
standards (javascript) based, image zoom and pan, with a great user
experience. One problem unlike all the other tools mentioned here,
which have python based tile cutting implementations, Deep Zoom was
utilizing a Windows only based program to process images and cut tiles.
I had a couple of hundred gigabytes of images to cut, and not a windows
system in sight. But based on this excellent blog write up by Daniel Gasiencia,
I constructed a python program using PIL that can be used as a command
line tool or library for constructing Deep Zoom Compatible image
pyramids. It can be found here,
hopefully its useful to others. As a bonus, it runs in a fraction of
the memory (1/6 by my measurements) needed by the GSIV image tile
cutter and faster as well ( 100 images in 5m vs 1.25hr). Unfortunately
the Seadragon Ajax Library is not opensource, but non commercial usage
seems to be okay with the license, and i’ll give it over to some
lawyers to figure it out.


To process the several hundred gigabytes of images, i utilized this library and wrote a batch driver utilizing  pyprocessing remote queues, a small zc.buildout and cloudcontrol to process the images across a cluster, but thats left as an implementation detail for the reader

Photo Zoom Tools


http://www.softsia.com/flash-photo-zoom-download-1.html

2009年1月20日 星期二

Image Optimization 讀書心得


前言



上個月在 YUI Blog 上有 4 篇 Image Optimization 的連載,若你重視網站的效能,這篇是非常經典且必讀的文章。
主要在於圖片格式的介紹、使用免費的命令列工具縮小圖片但不失真。難能可貴的是,作者 Stoyan Stefanov 也做了許多的實際測試,讓這系列的文章非常有說服力。以下為文章列表:

http://josephj.com/entry.php?id=209


Flash Image Zoom



http://www.flashden.net/item/zoom-pan-controls-with-dynamic-image-settings/15713?page=5

2009年1月15日 星期四

Popular Science Magazine架站案例分享


http://drupaltaiwan.org/forum/20080325/1976

Popular Science Magazine screenshot

2008年12月29日 星期一

Web Application 自動測試軟體

Selenium IDE - 測試,原來也可以這麼輕鬆


Filed under: JavaScript, Programming, Technologies, 技術 — Alan @ 23:27



Selenium IDE: Selenium IDE


今天介紹的這個工具真是做 web testing 的終極武器。Selenium IDE,是一個 Browser 的
plugin,安裝之後,你可以把你在網頁上的操作錄製起來。加上一些 check point 之後,就是一個全自動的 web testing
了。以前猛點、一直 key in
資料、搞不清楚自己按了什麼的日子不再出現。觀念簡單,操作容易,我想多寫幾句話去解釋它都有點難。如果還沒有弄懂的就看一下 demo影片吧


安裝方面,下載後直接安裝就好了。雖然是 Firefox plugin 但在 Flock 用也沒問題喔!


使用上,就是像影片看到的,用錄的方式,你點什麼或打什麼字就會錄起來了。關鍵是 check point 的設定,如同 xUnit
一派的做法,可以由一些 assertXXX 來當 check point。最當用的大概就是把文字選取起來,點右鍵就會出現
assertTextPresent 的選項,目的當然是希望來到這頁時需要檢查有沒有出現目標字串囉。錄製好之後,按 run 就會從頭跑一次,到
check point 的地方如果正確就會是綠色,出現錯誤會是紅色。而錄起來的 script 可以存成多種格式。


曾經在開發專案時開玩笑的說如果 UAT (User Acceptence Test) 能夠自動化就好了。因為 UAT 有幾十到幾百個
test case,由專人去跑一遍可能也要個一兩天,對時程是很傷的。而且大家都知道,測試通常會找出一些問題,那問題改了是要全部重測還是只測
fail case?考量到人力跟時間資源,大部份會只測 fail case,好一點再加抽幾個 test case
做抽檢。問題是,天知道改一個東西會影響到哪些部份,除非你敢保證你的 change impact analysis
做得很好。如果沒有,那還是乖乖全測比較保險。有了 Selenium IDE,那就好辦啦,把 script 開始來重跑一次就好了嘛!UAT
自動化不是夢!


另一個可行的用途是,網管或 MIS 需要確保 service alive,把 Selenium IDE 當作 service
monitor 也沒有什麼不行的,至少它簡單好用,在你學會或有錢買那些重型產品前之前,用 Selenium IDE
先頂住至少日子會好過一點。說穿了 service monitoring 就是一種測試嘛 (測試 service 有沒有活著)。


Selenium IDE 是由 OpenQA 所開發的,lincense 是親切可愛的 Apache 2.0。除了 Selenium IDE 以外,OpenQA 還有很多不錯的產品都是在 QA 方面會有用的。目前還沒有詳細做研究,但是 Selenium RC 似乎可以把 Selenium IDE 錄製的 script 再做點事。因為存 script 時的格式有些就是 for Selenium RC 的。如果你是 developer/tester,那不要懷疑了,趕快安裝 Selenium IDE 吧。

2008年12月10日 星期三

Excel 趨勢線的公式

Excel 趨勢線的公式


Linear Trendline



Equation: y = m * x + b

m: =SLOPE(y,x)

b: =INTERCEPT(y,x)


Logarithmic Trendline



Equation: y = (c * LN(x)) - b

c: =INDEX(LINEST(y,LN(x)),1)

b: =INDEX(LINEST(y,LN(x)),1,2)


Power Trendline



Equation: y=c*x^b

c: =EXP(INDEX(LINEST(LN(y),LN(x),,),1,2))

b: =INDEX(LINEST(LN(y),LN(x),,),1)


Exponential Trendline



Equation: y = c *e ^(b * x)

c: =EXP(INDEX(LINEST(LN(y),x),1,2))

b: =INDEX(LINEST(LN(y),x),1)


2nd Order Polynomial Trendline



Equation: y = (c2 * x^2) + (c1 * x ^1) + b

c2: =INDEX(LINEST(y,x^{1,2}),1)

C1: =INDEX(LINEST(y,x^{1,2}),1,2)

b = =INDEX(LINEST(y,x^{1,2}),1,3)


3rd Order Polynomial Trendline



Equation: y = (c3 * x^3) + (c2 * x^2) + (c1 * x^1) + b

c3: =INDEX(LINEST(y,x^{1,2,3}),1)

c2: =INDEX(LINEST(y,x^{1,2,3}),1,2)

C1: =INDEX(LINEST(y,x^{1,2,3}),1,3)

b: =INDEX(LINEST(y,x^{1,2,3}),1,4)

2008年11月23日 星期日

PHP 用的 Issue Tracking System

Mantisbt 是 PHP 用的 ITS

http://www.mantisbt.org/