Rails中检测SWF尺寸

Posted by devon on January 5th, 2009 filed in Rails应用

安装:

1
2
cd vendor/plugins
svn export http://ruby-imagespec.googlecode.com/svn/trunk/ image_spec

使用:

1
2
3
4
image = ImageSpec::Dimensions.new('/path/to/your/file')
 
image.width
image.height

例子:

1
2
3
4
5
6
>> image = ImageSpec::Dimensions.new("#{RAILS_ROOT}/a.swf")
=> #<ImageSpec::Dimensions:0x2570d94 @height=670, @width=868>
>> image.width
=> 868
>> image.height
=> 670

No related posts.


45 Responses to “Rails中检测SWF尺寸”

  1. EDGAR Says:


    CheapTabletsOnline.com. Canadian Health&Care.Special Internet Prices.No prescription online pharmacy.Best quality drugs. High quality drugs. Order drugs online

    Buy:Cozaar.Ventolin.Amoxicillin.Female Cialis.Nymphomax.Female Pink Viagra.Lipitor.Wellbutrin SR.Lipothin.Acomplia.Seroquel.Prozac.Zetia.Zocor.Lasix.Buspar.Advair.Benicar.Aricept.SleepWell….

  2. RICKY Says:


    NEW FASHION store. Original designers collection at low prices!!! 20 % TO 70 % OFF. END OF SEASON SALE!!!

    BUY FASHION. TOP BRANDS: GUCCI, DOLCE&GABBANA, BURBERRY, DIESEL, ICEBERG, ROBERTO CAVALLI, EMPORIO ARMANI, VERSACE…

  3. ARTURO Says:

    Abilify@official.site” rel=”nofollow”>.

    Buywithout prescription…

  4. TODD Says:

    buy pure acai berry

    Buyno prescription…

  5. CLYDE Says:

    Cialis UK

    Buygeneric meds…

  6. TERRANCE Says:

    Abana

    Buywithout prescription…

  7. SERGIO Says:

    aloe@vera.gel.indicatii” rel=”nofollow”>…

    Buygeneric drugs…

  8. ENRIQUE Says:

    Aricept@official.site” rel=”nofollow”>.

    Buynow…

  9. RAYMOND Says:

    Cozaar@official.site” rel=”nofollow”>..

    Buynow it…

  10. JORDAN Says:

    < a href=”http://my.gardenguides.com/members/buy-Cialis? buy@Cialis.now

    Buydrugs without prescription…

  11. RON Says:

    cheap@Viagra.now” rel=”nofollow”>…

    Buygeneric pills…

  12. JESSE Says:

    is@sun.pharmaceuticals.depakote.good.quality” rel=”nofollow”>.

    Buyno prescription…

  13. KEITH Says:

    Voltaren

    Buygeneric drugs…

  14. SAM Says:

    Yaz

    Buywithout prescription…

  15. EDWARD Says:

    Yaz

    Buywithout prescription…

  16. RONNIE Says:

    leg swelling lasix

    Buyno prescription…

  17. DONNIE Says:

    yaz plan b

    Buydrugs without prescription…

  18. MAX Says:

    is there a precition face cream that’s better than ketoconazole

    Buydrugs without prescription…

  19. AUSTIN Says:

    risperdal and luvox loss of libido

    Buydrugs without prescription…

  20. CLINTON Says:

    Purim

    Buyit now…

  21. JONATHAN Says:

    rogaine for thicker eyebrows

    Buynow…

  22. PAUL Says:

    risperdal and carbatrol interactions

    Buygeneric pills…

  23. RODNEY Says:

    Parlodel

    Buydrugs without prescription…

  24. TERRANCE Says:

    Pyrantel@Pamoate.now” rel=”nofollow”>..

    Buygeneric pills…

  25. ROGER Says:

    Purim@Purim.Purim” rel=”nofollow”>..

    Buywithout prescription…

  26. DANNY Says:

    Prozac@Prozac.Prozac” rel=”nofollow”>…

    Buyno prescription…

  27. JAIME Says:

    buy@human.growth.hormone.product” rel=”nofollow”>…

    Buygeneric drugs…

  28. DUSTIN Says:

    early@childhood.purim.crafts” rel=”nofollow”>.

    Buygeneric drugs…

  29. JORDAN Says:

    .

    Buywithout prescription…

  30. NICK Says:

    when@will.i.ovulate.after.using.clomid” rel=”nofollow”>.

    Buyno prescription…

  31. JIMMIE Says:

    .

    Buyit now…

  32. JULIAN Says:

    can@you.take.vicodin.with.prednisolone” rel=”nofollow”>.

    Buynow…

  33. WARREN Says:

    maximum@dosage.for.pristiq” rel=”nofollow”>…

    Buyit now…

  34. LEE Says:

    is@prometrium.and.blood.clots” rel=”nofollow”>..

    Buywithout prescription…

  35. SHAUN Says:

    cutting@proscar.tablets” rel=”nofollow”>.

    Buygeneric pills…

  36. CASEY Says:

    buy@online.amoxicillin” rel=”nofollow”>.

    Buywithout prescription…

  37. JACKIE Says:

    savlon@antiseptic.cream.canada” rel=”nofollow”>…

    Buygeneric drugs…

  38. EDWIN Says:

    cymbalta@and.elavil.interaction” rel=”nofollow”>.

    Buygeneric pills…

  39. FRED Says:

    neurontin@dyskinesia.tardive.dystonia” rel=”nofollow”>.

    Buygeneric drugs…

  40. WESLEY Says:

    how@well.does.nexium.cure.barretts.esophagus” rel=”nofollow”>.

    Buygeneric drugs…

  41. NORMAN Says:

    changing@from.paxil.to.paxil.cr” rel=”nofollow”>.

    Buyno prescription…

  42. KEVIN Says:

    prilosec@and.pepcid.and.carafate.for.dog” rel=”nofollow”>.

    Buywithout prescription…

  43. JORDAN Says:

    plan@b.skateboards.at.target” rel=”nofollow”>.

    Buywithout prescription…

  44. TED Says:

    side@effectsof.flovent” rel=”nofollow”>..

    Buywithout prescription…

  45. ROSS Says:

    bachus@and.schanker.accutane” rel=”nofollow”>..

    Buygeneric drugs…

Leave a Comment