similar to: invalid geometry string in change_geometry

Displaying 20 results from an estimated 100 matches similar to: "invalid geometry string in change_geometry"

2006 May 30
1
Can''t read from file field second time around
This piece of code takes an uploaded image and resizes it. It''s a bit nasty at the moment as I am still messing around with it. What I can''t understand is why it works for one iteration but then fails with: zero-length blob not permitted `'' On the line: img = Magick::Image.from_blob(self.image).first I am basically doing this in the controller and it fails on the
2006 May 19
9
Resize uploaded image file without creating temp file?
Hi, I need to take a single uploaded image file and save three resized versions of it, a thumbnail, normal and large version. I was planning on doing this in my model by having an array of geometry strings and looping through them, each time saving a new image object resized to the correct geometry. I know that file column does similar stuff, but I would prefer to have a separate database row
2006 Jul 22
7
Validation with has_many
I have two problems. I have a comment that has_many uploads. Before saving the comment, I want to be sure that the upload(s) has passed validation, but I also need to validate in other ways. For example, I do not want to save the comment if there is no comment or upload. Or, I do not want to save the comment if the image has been uploaded previously (comparing md5s with past upload md5s
2006 Apr 23
2
file_column and Thumbnails
I see that the SVN version of the excellent file_column plug-in can create thumbnails using the url_for_image_column helper. This uses Rmagick to create the thumbnail... Quick question... Let''s say the file is a TIFF image - can the helper create a JPG version of the thumbnail for display in the browser? Curious if the plug-in can handle that transform with some creative use of the
2006 Apr 27
7
SuperImage plugin
Greetings all, This is the first release of the SuperImage plugin. The idea is you upload images to the database, and then pull them out at any size you want. Combine this with caching and it will stay light and fast. More info and instructions are here: http://beautifulpixel.textdriven.com/articles/2006/04/27/superimage-plugin-making-resizeable-uploaded-images-easy svn:
2006 Jul 25
1
How do I validate using associated objects?
This doesn''t make any sense to me anymore. I have an Upload that belongs_to a Comment. Within my Upload model I expect to be able to access the associated comment with comment.foo. I can only seem to do this AFTER validation. I''m assuming before_create takes place between validation and updating the database, because when I try to access comment.foo within the validate
2008 Jan 22
4
Calling a function
Hi. I''m trying to call the function ''store_description(image)'' at line 9. However when I do, I get the error "undefined method ''store_description'' for Photo:Class". What can I do? 1: class Photo < ActiveRecord::Base 2: def store_description (image) 3: self.description = "size:
2005 Dec 19
3
RMagick Resizing Issue
Hello ~ I have RMagick and file_column working in RoR. In my model I am setting up some standard sizes for the submitted photos. The photo files are created and named correctly, but the sizes are wrong. Only the second argument of my geometry call is used, with the width dimension being resized proportionately. file_column :image, :magick => { :versions => { "medium" =>
2006 Feb 03
3
File_column and rmagick options
Hi, Currently I''m using the file_column plugin to upload images and save multiple copies of each at 3 different resoltions: file_column :name, :magick => { :versions => { "thumb96" => "96x150>", "medium250" => "250x400>", "large480" => "480X640>" } } I am wondering if
2008 Dec 04
2
Does animated gif will work properly using RMagick?
Dear all, I have used RMagic to read and write a image while uploading. An animated gif was read from my local machine and was written in my images folder using RMagick. But the animated gif which i read was witten in my folder without animation. What should i do to write the gif image with animation. Here is my code to read and write image while uploading. image = params[:image][:blob]
2006 May 16
0
Image format gotcha
I''ve been doing a lot of testing witn RMagick lately, in view of reports that it leaks memory. I''m happy to report that RMagick doesn''t seem to leak at all, when used as directed -- that is, when you remember to set the image variable to nil and call GC.start manually after you''re done with an image. BUT -- one ImageMagick format seems to be leaky! I was
2006 Apr 24
0
ImageMagick and EXIF Data
Hi there, I''m writing a little application that parses an image file and extracts the camera settings from the file (the EXIF data) and saves all the fields to the database. The idea is that after awhile people will be able to search based on camera make, model, lens settings, etc... and all the pictures that meet those requirements will be displayed. The picture is stored on the file
2002 Nov 26
2
Samba with HP 110x Machines.
Hi! We have a HP b2600 Workstation, with HP 110x UNIX system, at our work place. Currently it is lying idle and we would like to utilize it. Is it possible to put Samba on this machine and use it as a PDC using the samba suite? Thank you for your help Gagneet
2006 Mar 08
2
Creating new Magick::Image from uploaded data
Hi! Is it possible to create a new instance of Magick::Image out of uploaded data via file input? Now i save my file to the disk, then read it to create an instance of Magick::Image, resize it and save it again. -- Posted via http://www.ruby-forum.com/.
2006 Mar 08
3
file_column Cropping -> image offset information
Hello, I had a problem cropping images with file_column. These are my settings: file_column :image, :magick => { :versions => { :thumb => "80x80>", :medium => "150x150>", :square => { :crop => "1:1", :size => "50x50!" } },
2005 Oct 11
8
resize images
Hi, I am looking for the best solution to resize images to fit within a certain area. The images will only be made smaller if they will not fit within a fixed size area. It is important to maintain the same proportions. This ImageMagick extension looks promising: http://vantulder.net/rails/magick/ However, I believe it may be overkill for just resizing images sometimes. I have also seen a
2006 Apr 07
4
file_column and animated gifs
hi, is it possible to resize animated gifs with file_column? if i upload an animated gif file with file_column than the animation no longer exists... -- Posted via http://www.ruby-forum.com/.
2007 Mar 28
3
attachment_fu Not Resizing
Hello, Recently attachment_fu stopped resizing images for me. I''m puzzled because before today it was resizing them and I don''t know what''s changed. Here''s my code: class Product < ActiveRecord::Base has_attachment :content_type => :image, :storage => :file_system, :max_size => 18.megabytes,
2007 Aug 23
6
controller spec with model that validates_uniqueness
I want to use mocks and stubs to test the controller, but am having trouble getting my validation not to trigger. Here''s the code: # spec: Image.stub!(:find).and_return(@image) @image.should_receive(:save!).once.with(:any_args) put :update, :id => @image.id, :category_id => @category.id, :image => {:name => ''test'', :image_number =>
2006 Feb 28
1
ArgumentError (string contains null byte) -- file upload problem
Hi, Controller code: if params[:main_image] image = Image.new image.blob = params[:main_image].read @product.main_image.destroy if @product.main_image @product.main_image = image end When I try to display the image using send_data, I get the following error: ArgumentError (string contains null byte):