Rmagickã使ã£ã¦ç¸¦æ¨ªã®æ¯çããã©ãã©ã®ç»åãããæ£æ¹å½¢ã®ãµã ãã¤ã«ãåãåºãRubyã®ãµã³ãã«ã½ã¼ã¹ã§ãã以åã¯å¤§ããªç»åã縮å°ããã ãã§ããããä»åã¯ç¸¦ã»æ¨ªã®ä¸¡æ¹ãäºå®ã®ãµã¤ãºä»¥ä¸ãªãåãåºãã¦æ£æ¹å½¢ããããããå°ããå ´åã¯ç©ºç½ã§åãã¦ç»åãæ¡å¤§ããªãããã«èª¿æ´ã ð ã½ã¼ã¹ã³ã¼ããµã³ãã«ã½ã¼ã¹ã§ã¯æ¬¡ã®ãã¨ããã¦ãã¾ãã (1) ãµã³ãã«ã®ç»åããã¦ã³ãã¼ã (2) Rmagickã使ã£ã¦æ£æ¹å½¢ã®ãµã ãã¤ã«ç»åãåãåºã (3) ./data/ãã©ã«ãã«ãµã ãã¤ã«ç»åãä¿å require 'rubygems' require 'open-uri' require 'rmagick' # gem install rmagick def shrink_to_fill(image, width, height) image.resize_to_fill!(width, height)
{{#tags}}- {{label}}
{{/tags}}