search for: flatten_images

Displaying 2 results from an estimated 2 matches for "flatten_images".

2009 Jan 24
0
reprocess attachment_fu thumbnails with ImageMagick edits
...e_save if self.sold_changed? && self.sold? for photo in self.photos imagelist = Magick::ImageList.new imagelist.read(File.join(RAILS_ROOT, "public", photo.public_filename), File.join(RAILS_ROOT, "assets", "sold.png")) imagelist.flatten_images.write(photo_file) photo.save! end end end Does anyone know why calling ''photo.save!'' would discard my ImageMagick changes? When I try the same function without calling photo.save!, my original image is modified exactly as I intend but the thumbnails are not upd...
2012 Aug 07
3
Barcode Generating With Label On Canvas by using Barby gem
...iter'' module Barby class RmBarcode < ActiveRecord::Base register :to_image_with_data def to_image_with_data #Make canvas bigger canvas = Magick::ImageList.new canvas.new_image(full_width , full_height + 10) canvas << to_image canvas = canvas.flatten_images #Make the text text = Magick::Draw.new text.font_family = ''helvetica'' text.pointsize = 14 text.gravity = Magick::SouthGravity text.annotate(canvas , 0,0,0,0, barcode.data) canvas end end end barcode = Barby::Code128B.new(''Ba...