èªåã®Railsã¢ããªã§ç»åã®ãªãµã¤ãºå¦çããããã£ãã®ã§RMagickã触ã£ã¦ã¿ã¾ããã ç¨ä»¶ã¨ãã¦ã¯ãã»DBããç»åãã¼ã¿èªã¿è¾¼ã¿ã»æ¨ªå¹ ä¸å®ã§ç¸¦æ¨ªã®æ¯çãåããã¦ãªãµã¤ãºã»ãµã ã表示ã§ããDBããèªã¿è¾¼ãã ç»åãã¼ã¿ãã©ããã£ã¦ImageMagickã«æ¸¡ããæ©ã¿ã¾ãããä»ã®ãµã¤ãã®è§£èª¬ã¨ãè¦ã¦ããã¡ã¤ã«ããèªã¿è¾¼ãæ¹æ³ããè¼ã£ã¦ãªãã RMagick.rbãçºãã¦ã¿ãã .from_blob ã£ã¦ã¡ã½ããããããã¨ã«æ°ä»ãã¦ããã¯ä½¿ãããããªãã®ãã¨ããã£ãããã³ãã·ã£ã§ããã æ¨ªå¹ ã¯ Image#columnsããåå¾ãã¦ãªãµã¤ãºã¯ Image#resize()ãããã®ã§å¾ã¯ç°¡åã§ããã以ä¸ã³ã¼ãæç def get_sumnail photo = Picture.find(params[:id]) img = Magick::Image.from_blob(photo.data).
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}