Changes between Version 19 and Version 20 of img2twit


Ignore:
Timestamp:
05/25/2009 11:29:06 PM (15 years ago)
Author:
Sam Hocevar
Comment:

put examples before the "how it works"

Legend:

Unmodified
Added
Removed
Modified
  • img2twit

    v19 v20  
    1 A few notes and thoughts about compressing images to 140 characters, for use on Twitter.
     1= About img2twit =
     2
     3`img2twit` is a program that reads an image and compresses it to a short string of text. It can be used, eg. on Twitter.
    24
    35The first I read about this problem was [http://www.flickr.com/photos/quasimondo/3518306770/in/set-72057594062596732/ here].
    46
    57There is now a [http://stackoverflow.com/questions/891643/twitter-image-encoding-challenge competition] on !StackOverflow.com.
     8
     9= Preliminary results =
     10
     11Here are the results of `img2twit` using 140 characters, restricted to U+4e00..U+9fa5 (CJK Unified Ideographs). The 一一一一 characters at the end of some lines indicate wasted bits that the algorithm is unable to use efficiently yet.
     12
     13[[Image(lena_std_scaled.png)]] [[Image(twitter1.png)]]
     14
     15騂耳物谕炏褲閵欫蠳豵辢冟顥莬蒯焚鴩葖躧聩鯉笣再檄賁糕耇腀鯵黈洟尊弾鋚猠鎝愚姁鸐銇父蓼鼒纴竰配搮虽栆艡餐杏昦缐寣絠霗竁湟潕牠檫肇涆嫯賿龏羝风姣趹鱿睓羨棛漑鲋畍淌剛驞蘹撜蠞箄峾頓轒澊鮽冎搓腑冢擜塙悀閾蒢遆黡蚂毗桡艈澼琢輝執捀潏撽鬗鍴齽隶帍蒳鳞蘳牝賩占牓吙硘鷸騢挓磪捤鵘坰硖肕萘饼皹侯滗
     16
     17[[Image(Mona_Lisa_scaled.jpg)]] [[Image(twitter2.png)]]
     18
     19屰畐閆垥韌窐汩拜懘噣瓜窛岧敥輧叅遊値鬪狐繚确龣圶蟿挏詛啓逻谓魮緟之郧曪洌梈銮锯匘瑌滟葟鑬偶屑見杊讞櫳窬偩掛炘忧阙膇样箠愍畄帠掭歜黵歫徯堠傌蕨鱏鷥軠慰糐掭辢猆孏錦戹濸巉魽嚲腫就恩沽厲測沎婲舁铧蠃犱闆醛焊茴鋈叶狝痺矹铓疿镭緄熐魆郗忤櫯嫟韥烥彸漻藉醺夝趼惻炘訶焝汒蝧潚诪躗丌一一一一一一
     20
     21[[Image(Cornell_box_scaled.png)]] [[Image(twitter3.png)]]
     22
     23瓊锧抹璧浀飈捤賊麶橎紼杲籯愕勷剷棡苇緀峾烄寊倧塵湈嬅柮掯蠥揓趫龋鴥灭頃挨鸃鵱衂滟衏媵櫝篢贬塣劙捍蕼綕薿拨镶貶石聫艻綷蚸爫穧狜贮鶗迀祬貅缈宏鬽尜畳谬呏硫炟铹穜奫袧蹬虜藯趵螬壐挴钺佁莣厭嬋尯孀朢紈匝掸拰晳询铳矾放誃碠鱽閦娮諒懹覊噡綆结酯嘴謱嶔驃弟锯膇黮藒杏稿拎诽倸贜别盬竈浈璝锉橪欘一
     24
     25[[Image(so-logo.png)]] [[Image(twitter4.png)]]
     26
     27蜥秓鋖筷聝诿缰偺腶漷庯祩皙靊谪獜岨幻寤厎趆脘搇梄踥桻理戂溥欇渹裏軱骿苸髙骟市簶璨粭浧鱉捕弫潮衍蚙瀹岚玧霫鏓蓕戲債鼶襋躻弯袮足庭侅旍凼飙驅據嘛掔倾诗籂阉嶹婻椿糢墤渽緛赐更儅棫武婩縑逡荨璙杯翉珸齸陁颗鳣憫擲舥攩寉鈶兓庭璱篂鰀乾丕耓庁錸努樀肝亖弜喆蝞躐葌熲谎蛪曟暙刍镶媏嘝驌慸盂氤缰殾譑
     28
     29[[Image(mandrill_scaled.jpg)]] [[Image(twitter5.png)]]
     30
     31豪弅淶鑆斳愔耐俬秱戂孤访红艶劃嬌躑擣昗呎腆猎扭僬题猛嬰頽恓劉檭橀韮闼帣赑峈鮦宝鰢斣麙蓑騰騺鹸希關鈯穨唖秴斮圫究傲駛朘铃邂巢沿譓船櫃晒峩泪蝻鵲皲販口谹鎺侒戣耔凉蠛抏槱戛蝂荄勞攞咉闏涪彃沏全偫吒溸乎洸螕慹鳩弭蚕弣寽砰薨埻铥恣噿悏镏雈壭蒬礡靑徠鼛慗泏郄渺婥俦攨賌羢髙壶耔僪爯姉蔮蠬伣豖弫
     32
     33= Getting `img2twit` =
     34
     35You can use `img2twit`, modify it and redistribute it for any purpose, according to the terms of the [http://sam.zoy.org/wtfpl/ WTFPL]. Note however that it uses third-party libraries such CGAL (which has odd licensing terms) and Imlib2.
     36
     37`img2twit` is currently research material and is not available in any released software yet. If you wish to try it, get the [wiki:libpipi] source code.
     38
     39If you just want to have a look at the code, get it [/browser/libpipi/trunk/examples/img2twit.cpp from the web-based browser].
    640
    741= How it works =
     
    80114
    81115The rendering method is responsible for both the artifacts (mainly the embossed dots) and the nice edges found in some parts of the resulting images.
    82 
    83 = Preliminary results =
    84 
    85 Here are the results of `img2twit` using 140 characters, restricted to U+4e00..U+9fa5 (CJK Unified Ideographs). The 一一一一 characters at the end of some lines indicate wasted bits that the algorithm is unable to use efficiently yet.
    86 
    87 [[Image(lena_std_scaled.png)]] [[Image(twitter1.png)]]
    88 
    89 騂耳物谕炏褲閵欫蠳豵辢冟顥莬蒯焚鴩葖躧聩鯉笣再檄賁糕耇腀鯵黈洟尊弾鋚猠鎝愚姁鸐銇父蓼鼒纴竰配搮虽栆艡餐杏昦缐寣絠霗竁湟潕牠檫肇涆嫯賿龏羝风姣趹鱿睓羨棛漑鲋畍淌剛驞蘹撜蠞箄峾頓轒澊鮽冎搓腑冢擜塙悀閾蒢遆黡蚂毗桡艈澼琢輝執捀潏撽鬗鍴齽隶帍蒳鳞蘳牝賩占牓吙硘鷸騢挓磪捤鵘坰硖肕萘饼皹侯滗
    90 
    91 [[Image(Mona_Lisa_scaled.jpg)]] [[Image(twitter2.png)]]
    92 
    93 屰畐閆垥韌窐汩拜懘噣瓜窛岧敥輧叅遊値鬪狐繚确龣圶蟿挏詛啓逻谓魮緟之郧曪洌梈銮锯匘瑌滟葟鑬偶屑見杊讞櫳窬偩掛炘忧阙膇样箠愍畄帠掭歜黵歫徯堠傌蕨鱏鷥軠慰糐掭辢猆孏錦戹濸巉魽嚲腫就恩沽厲測沎婲舁铧蠃犱闆醛焊茴鋈叶狝痺矹铓疿镭緄熐魆郗忤櫯嫟韥烥彸漻藉醺夝趼惻炘訶焝汒蝧潚诪躗丌一一一一一一
    94 
    95 [[Image(Cornell_box_scaled.png)]] [[Image(twitter3.png)]]
    96 
    97 瓊锧抹璧浀飈捤賊麶橎紼杲籯愕勷剷棡苇緀峾烄寊倧塵湈嬅柮掯蠥揓趫龋鴥灭頃挨鸃鵱衂滟衏媵櫝篢贬塣劙捍蕼綕薿拨镶貶石聫艻綷蚸爫穧狜贮鶗迀祬貅缈宏鬽尜畳谬呏硫炟铹穜奫袧蹬虜藯趵螬壐挴钺佁莣厭嬋尯孀朢紈匝掸拰晳询铳矾放誃碠鱽閦娮諒懹覊噡綆结酯嘴謱嶔驃弟锯膇黮藒杏稿拎诽倸贜别盬竈浈璝锉橪欘一
    98 
    99 [[Image(so-logo.png)]] [[Image(twitter4.png)]]
    100 
    101 蜥秓鋖筷聝诿缰偺腶漷庯祩皙靊谪獜岨幻寤厎趆脘搇梄踥桻理戂溥欇渹裏軱骿苸髙骟市簶璨粭浧鱉捕弫潮衍蚙瀹岚玧霫鏓蓕戲債鼶襋躻弯袮足庭侅旍凼飙驅據嘛掔倾诗籂阉嶹婻椿糢墤渽緛赐更儅棫武婩縑逡荨璙杯翉珸齸陁颗鳣憫擲舥攩寉鈶兓庭璱篂鰀乾丕耓庁錸努樀肝亖弜喆蝞躐葌熲谎蛪曟暙刍镶媏嘝驌慸盂氤缰殾譑
    102 
    103 [[Image(mandrill_scaled.jpg)]] [[Image(twitter5.png)]]
    104 
    105 豪弅淶鑆斳愔耐俬秱戂孤访红艶劃嬌躑擣昗呎腆猎扭僬题猛嬰頽恓劉檭橀韮闼帣赑峈鮦宝鰢斣麙蓑騰騺鹸希關鈯穨唖秴斮圫究傲駛朘铃邂巢沿譓船櫃晒峩泪蝻鵲皲販口谹鎺侒戣耔凉蠛抏槱戛蝂荄勞攞咉闏涪彃沏全偫吒溸乎洸螕慹鳩弭蚕弣寽砰薨埻铥恣噿悏镏雈壭蒬礡靑徠鼛慗泏郄渺婥俦攨賌羢髙壶耔僪爯姉蔮蠬伣豖弫
    106 
    107 = Getting `img2twit` =
    108 
    109 You can use `img2twit`, modify it and redistribute it for any purpose, according to the terms of the [http://sam.zoy.org/wtfpl/ WTFPL]. Note however that it uses third-party libraries such CGAL (which has odd licensing terms) and Imlib2.
    110 
    111 `img2twit` is currently research material and is not available in any released software yet. If you wish to try it, get the [wiki:libpipi] source code.
    112 
    113 If you just want to have a look at the code, get it [/browser/libpipi/trunk/examples/img2twit.cpp from the web-based browser].