On 10/12/2007, akang aziz <[EMAIL PROTECTED]> wrote: > > dear para sensei, > > mo tanya solusi terbaik untuk resize image di rails itu pake apa ya?? > > saya pake rmagick untuk resize file image (gif, png, jpg) di rails. Tadinya > gak ada masalah pas resize image, karena kebetulan yg saya test itu file2 > image non animated. Tp setelah saya test pake file gif yg ada animasi nya > (mksdnya file2 gif yg bergerak-gerak yg biasa di pake buat banner/iklan), ada > masalah saat resize.. si rmagick ternyata hanya mengambil salah satu frame > dari file gif tsb, walhasil, output hasil resize nya jadi gak berupa animasi > lagi... > > ada yg suka ngoprek2 rmagick? mhn pencerahannya > > ini source code di model saya, sy udah coba pake resize, resize_to_fit, > crop_resized, thumbnail msh aja blm bisa untuk tipe file animated gif: > > def thumb_max_size(a, b) > @a = [a, b] > end > > def resize_adbanner > img = Magick::Image.read(path).first #read image yang lama > #thumb = img.thumbnail([EMAIL PROTECTED]) > thumb = img.crop_resized(230, 75)# -> image > #thumb = img.resize(230, 75) > #thumb = img.resize(1)# -> anImage > #thumb = img > thumb.write path #tulis image yang baru > end > > ref: > http://www.goodbyehelicopter.com/category/rmagick/ > http://studio.imagemagick.org/RMagick/doc/ >
Mo nyoba njawab, Si ImageMagick-nya dah ngedukung GIF belum? Coba buka di console: $convert -h ##========> gwe lupa nih detail parameternya apa aja, so klo baris di bawah salah, mohon koreksi balik $convert | grep GIF $convert | grep PNG #buat referensi aja, iseng2 $convert | grep JPG #buat referensi aja, iseng2 suwun. > __________________________________________________________ > Looking for last minute shopping deals? > Find them fast with Yahoo! Search. > http://tools.search.yahoo.com/newsearch/category.php?category=shopping > > [Non-text portions of this message have been removed] > > -- in03ng a.k.a inung a.k.a nursamsi a.k.a nur syamsi Y! in03ng

